#include <iostream>
using namespace std;
int main()
{
int n, m, a=0, b=0;
cin>>n>>m;
for (int i=1; i<n; i++)
if (n%i==0)
a++;
for (int i=1; i<m; i++)
if (m%i==0)
b++;
if (a>b)
cout<<"Wygral gracz 1";
else if (a<b)
cout<<"Wygral gracz 2";
else
cout<<"Remis";
return 0;
}