#include <bits/stdc++.h>
using namespace std;
#define int long long
#define sc(x) scanf("%lld",&(x));
#define pb push_back
#define fi first
#define se second
int A[55];
int P[] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47};
int B[55];
int ans = -1;
int n;
void dfs(int x){
    if(x == 15){
        int y = 1;
        for(int i = 0; i < 15; i++){
            if(B[i]){
                y *= P[i];
            }
        }
        bool flag = true;
        for(int i = 0; i < n; i++){
            if(__gcd(A[i],y) == 1){
                flag = false;break;
            }
        }
        if(flag&& (y < ans|| ans == -1))ans = y;
        return;
    }
   B[x] = 0;
   dfs(x+1);
   B[x] = 1;
   dfs(x+1);
}
signed main()
{

    sc(n)
    for(int i = 0; i < n; i++)
    {
        sc(A[i])

    }
    dfs(0);
    cout << ans <<'\n';
}

#include<bits/stdc++.h>
using namespace std;

int main(){
  	int a,b,c;
	cin>>a>>b>>c;
  	if(c==0)
    {
      if(a>b)
        cout<<"Takahashi\n";
      else
        cout<<"Aoki\n";
    }
  	else
    {
      if(b>a)
        cout<<"Aoki\n";
      else
        cout<<"Takahashi\n";
    }
	return 0;
}