Help me in solving MAXX problem

My issue

why runtime error come

My code

import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
	Scanner s= new Scanner(System.in);
	int T=s.nextInt();
 while(T-->0){
     int A=s.nextInt();
     int B=s.nextInt();
     int X=s.nextInt();
     int Y=s.nextInt();
     
     if((A*2 + B*1)>(X*2 + Y*1)){
         System.out.println("Messi");
     }
     else if((X*2 + Y*1)>(A*2 + B*1)){
     System.out.println("Ronaldo");
         }
         else{
             System.out.println("equal");
         }
}
	}
}

Problem Link: XOR And Multiply Practice Coding Problem - CodeChef

@anand_singh066
your code looks like for some other problem . Not for MAXX.
for maxx refer my c++ code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--)
	{
	    long long int x;
	    cin>>x;
	    long long int a=x;
	    long long int lg=log2(x);
	    lg++;
	    long long int b=x<<lg;
	    b+=a;
	    cout<<a<<" "<<b<<endl;
	}
	return 0;
}