#include<iostream>
#include<stdio.h>
#include<stdlib.h>


using namespace  std;

int main()
{float  A,B,C,D,A1,A2;
//cout<<"enter the dimensions of 1st rectangle i.e.A and B"<<endl;
cin>>A>>B;
//cout<<"enter the dimensions of 1st rectangle i.e.A and B"<<endl;
cin>>C>>D;
A1=A*B;
A2=C*D;
if(A1>A2)
{cout<<"1st rectangle has larger area";}
elseif(A1<A2)
{cout<<"2d rectangle has larger area";}
else
{cout<<"both have equal area";}
return 0;
}

