/*** akshaykumar99 ***/
 
#include<bits/stdc++.h> 
using namespace std;
 
const long long MOD = 1e9+7;
const long double PI = acos(-1);
const long long N = 1e6+1;
 
typedef long long ll;
typedef long double ld;

int spf[N]; 
void sieve() 
{ 
    spf[1] = 1; 
    for (int i=2; i<N; i++) 
        spf[i] = i; 
  
    for (int i=4; i<N; i+=2) 
        spf[i] = 2; 
  
    for (int i=3; i*i<N; i++) 
    { 
        if (spf[i] == i) 
        { 
            for (int j=i*i; j<N; j+=i)             
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
vector<int> getFactorization(int x) 
{ 
    vector<int> ret; 
    while (x != 1) 
    { 
        ret.push_back(spf[x]); 
        x = x / spf[x]; 
    } 
    return ret; 
} 
void test_case()
{
    ll n;
    cin >> n;
    vector<ll> v(n);
    sieve();
    for(int i = 0; i < n; i++)
    {
    	cin >> v[i];
    }
    vector<bool> done(N, 0);
    bool flag = 0;
    for(int i = 0; i < n; i++)
    {
    	vector<int> p = getFactorization(v[i]);
    	for(int j = 0; j < p.size(); j++)
    	{
    		if(done[p[j]])
    		{
    			flag = 1;
    			break;
    		}
    		done[p[j]] = 1;
    	}
    	if(flag)
    		break;
    }
    if(!flag)
    {
    	cout << "pairwise coprime\n";
    	return;
    }
    ll gg = v[0];
    for(int i = 1; i < n; i++)
    {
    	gg = __gcd(gg, v[i]);
    }
    if(gg == 1)
    {
    	cout << "setwise coprime\n";
    	return;	
    }
    cout << "not coprime\n";


}
 
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL); 
    ll tc=1;
    // cin>>tc;
    while(tc--)
        test_case();
    return 0;
}
