#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); long long a, n; cin >> a >> n; long long p = 1; for (long long i = 0; i < n; i++) { p *= a; if (p >= 10000000LL) { cout << p << endl; cout << 0 << endl; return 0; } } cout << 10000000 << endl; cout << p << endl; return 0; }