#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
for(long long i=2;i<=40;++i){
for(long long j=0;j<=10;++j){
if( ((long long)ceil(pow(i,j)) - (long long)pow(i,j)) !=0 ){
cout<<i<<" "<<j<<"\n";
}
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJLy8geW91ciBjb2RlIGdvZXMgaGVyZQoJZm9yKGxvbmcgbG9uZyBpPTI7aTw9NDA7KytpKXsKCSAgICBmb3IobG9uZyBsb25nIGo9MDtqPD0xMDsrK2opewoJICAgICAgICBpZiggKChsb25nIGxvbmcpY2VpbChwb3coaSxqKSkgLSAobG9uZyBsb25nKXBvdyhpLGopKSAhPTAgKXsKCSAgICAgICAgICAgIGNvdXQ8PGk8PCIgIjw8ajw8IlxuIjsKCSAgICAgICAgfQoJICAgIH0KCX0KCXJldHVybiAwOwp9