#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;
}