CF 1816A
int gcd(int a, int b){
return b ? gcd(b, a % b) : a;
}
void solve(){
int a,b;
cin>>a>>b;
if(gcd(a, b) == 1){
cout << 1 << endl;
cout << a << ' ' << b << endl;
}
else {
cout << 2 << endl;
cout << 1 << ' ' << b - 1 << endl;
cout << a << ' ' << b << endl;
}
}