#include #include using namespace std; using ll = long long; #define rep(i,n) for(int i=0;i<(n);i++)//0-indexed #define REP(i,j,n) for(int i=j;i<(n);i++) #define all(a) (a).begin(),(a).end() #define sort(a) sort(all(a)) #define reverse(a) reverse(all(a)) #define INF 1e9 namespace mp = boost::multiprecision; int dx[]={1,0,-1,0}; int dy[]={0,1,0,-1}; //power mp::cpp_int mypower(mp::cpp_int a,mp::cpp_int b,mp::cpp_int m){ mp::cpp_int res=1,x=a; while(b){ if(b&1){ res=(res*x)%m; } x=(x*x)%m; b>>=1; } return res; } int main(){ mp::cpp_int n,m; cin>>n>>m; cout<