#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b; c=pow(a,b); if(a>10&&b>9) cout<<-1; else cout<<c; return 0; }