//agrawal117
//chahatagrawal117
#include<bits/stdc++.h>
#define endl '\n'
#define mod 1000000007
typedef long long int ll;
using namespace std;
#define MAX 1000005
ll arr[MAX+2];
bool check()
{
    for(int i=1;i<MAX;i++){
        if(arr[i]>1) return false;
    }
    for(int i=2;i<MAX;i++)
    {
        ll cnt=0;
        for(int j=i;j<MAX;j+=i){
            if(arr[j]==1) cnt++;
        }
        if(cnt>1) return false;
    }
    return true;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n; cin>>n;
    ll gcd=0;
    for(int i=1;i<=n;i++) {
        ll a; cin>>a;
        gcd=__gcd(gcd,a);
        arr[a]++;
    }
    if(check())
    {
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
    if(gcd==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }
    cout<<"not coprime"<<endl;
    
    
}