题目 

#include<iostream>
#include<cmath>
using namespace std;
int main() {
	int n,x,y;
	cin>>n>>x>>y;
	int a=-1,b=-1;
	double c=-1;
	for(int i=99; i>=10; --i) {
		int t=i%10*10+i/10;
		if((int)fabs(t-i)*y==t*x) {
			a=i;
			b=t;
			c=1.*t/y;
			break;
		}
	}
	if(a!=-1) {
		cout<<a<<" ";
		n==a?cout<<"Ping ":n>a?cout<<"Gai ":cout<<"Cong ";
		n==b?cout<<"Ping ":n>b?cout<<"Gai ":cout<<"Cong ";
		n==c?cout<<"Ping\n":n>c?cout<<"Gai\n":cout<<"Cong\n";
	} else cout<<"No Solution\n";
	return 0;
}