f[a,b]=mod(a^mod b 44)10 m@main=getLine>>=print.f.map read.words>>m