private int isPower(int n){
		for (int i=2;i<=10;i++){
			int temp = n;
			int p = 0;
			while(temp>1){
				p++;
				if(temp%i != 0) break;
				temp=temp/i;
			}
			if(temp == 1) return p;
		}
		return 0;
	}