A,B=102,206 print(A,B,flush=True) K=int(input()) a=1 for p in[2,103]: if K%p<1:a*=p**A print(a%B)