class Main{
public static long pow(long a, long b){
if(b == 0){
return 1;
}
if(b % 2 == 0){
return pow(a * a, b / 2);
}
return a * pow(a, b - 1);
}
public static void main
(String[] args
){ java.
util.
Scanner in
= new java.
util.
Scanner(System.
in); long a = in.nextLong(), b = in.nextLong();
}
}
Y2xhc3MgTWFpbnsKICBwdWJsaWMgc3RhdGljIGxvbmcgcG93KGxvbmcgYSwgbG9uZyBiKXsKICAgIGlmKGIgPT0gMCl7IAogICAgICByZXR1cm4gMTsgCiAgICB9IAogICAgaWYoYiAlIDIgPT0gMCl7IAogICAgICByZXR1cm4gcG93KGEgKiBhLCBiIC8gMik7IAogICAgfSAKICAgIHJldHVybiBhICogcG93KGEsIGIgLSAxKTsKICB9CiAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpewogICAgamF2YS51dGlsLlNjYW5uZXIgaW4gPSBuZXcgamF2YS51dGlsLlNjYW5uZXIoU3lzdGVtLmluKTsKICAgIGxvbmcgYSA9IGluLm5leHRMb25nKCksIGIgPSBpbi5uZXh0TG9uZygpOwogICAgU3lzdGVtLm91dC5wcmludGxuKHBvdyhhLGIpKTsKICB9Cn0=