Scanner input=new Scanner(System.in);
int a=input.nextInt();
int b=input.nextInt();
int temp;
if(a<b) {
temp=a;
a=b;
b=temp;
}
else {
temp=b;
}
System.out.println(temp);
for(;temp>1;temp--) {
if((a%temp==0)&&b%temp==0) {
break;
}
}
System.out.println(temp);
a=10 b= 25 a< b temp=a=10