#include<bits/stdc++.h>
using namespace std;
                       ///****   Hasebul Hassan Chowdhury ***////
#define ms(a,v)        memset(a,v,sizeof a)
#define lll            long long
#define FOR(i,a,b)     for(int i=a;i<=b;i++)
#define fast           ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Read           freopen("READ.txt", "r", stdin)
#define Write          freopen("OUTPUT.txt", "w", stdout)
#define INF            1000000007

const int RT = 2100;

vector<int>prime;
bitset<2103> status;


void sieve()
{
    int rt = sqrt(RT);
    //for(int i = 4; i <= rt; i+=2) status[i]=true;
    for(int i = 3; i <= rt; i+=2)
        if(!status[i])
            for(int j = i*i; j < RT; j+=(i<<1))
                status[j] = true;

    prime.push_back(2);

    for(int i = 3; i <= RT; i+=2)
        if(!status[i])
            prime.push_back(i);
}

void solve()
{
	sieve();
	int n,f=0;
	cin>>n;
	int arr[n+3];
    for(int i=1;i<=n;i++) cin>>arr[i];
    int limit=prime.size();
    for(int i=0;i<limit;i++)
    {
    	int cnt=0;
    	for(int j=1;j<=n;j++)
    	{
    		if(arr[j]%prime[i]==0) cnt++;
    	}
    	if(cnt>=2) { f=1; break; }
    }
    if(f==0) { cout<<"pairwise coprime"<<endl; return; }
    int num=arr[1];
    for(int i=2;i<=n;i++)
    {
    	num=__gcd(num,arr[i]);
    }
    if(num==1) cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}

int main()
{
    fast
    #ifndef ONLINE_JUDGE
    Read;
    Write;
    #endif
    //sieve();
    //int cnt=1;
    //int t; cin>>t; while(t--) solve();
    solve();
}