#include<bits/stdc++.h> 
using namespace std;
typedef long long ll; 
typedef pair<int, int> pii; 
typedef pair<ll, ll> pll; 
typedef pair<string, string> pss; 
typedef vector<int> vi; 
typedef vector<vi> vvi; 
typedef vector<pii> vii; 
typedef vector<int, pii> viii; 
typedef vector<pll> vll; 
typedef vector<ll> vl; 
typedef vector<vl> vvl; 
typedef vector<vector<vl>> vvvl; 
const int MAXN = 10005000;
int spf[MAXN]; 
int gcd1(int a, int b) { 
    if (b == 0) 
        return a; 
    return gcd1(b, a % b);  
} 
void sieve() { 
    spf[1] = 1; 
    for (int i=2; i<MAXN; i++) 
        spf[i] = i; 
    for (int i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (int i=3; i*i<MAXN; i++) { 
        if (spf[i] == i) { 
            for (int j=i; j<MAXN; 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; 
} 

int main() {
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout); 
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL) ; cout.tie(NULL);
    sieve();
    int n,m,i,j,k;
    cin>>n;
    vector<int>a(n);
    for(i=0;i<n;i++)cin>>a[i];
    vector<int>mark(n+1,0);
    int flag=1;
    for(i=0;i<n&&flag;i++){
        vi p = getFactorization(a[i]);
        if(p.size() && p[0]!=1){
            vector<int>::iterator ip; 
            ip = unique(p.begin(), p.end()); 
            p.resize(distance(p.begin(), ip)); 
            int k=p.size();
            for(j=0;j<k&&flag;j++){
                if(mark[p[j]]==0)mark[p[j]]=1;
                else {
                    flag=0;
                }
            }
        }
    }
    if(flag==1)cout<<"pairwise coprime"<<endl;
    else {
        int gcd=a[0];
        for(i=1;i<n;i++){
            gcd = gcd1(gcd, a[i]);
        }
        if(gcd==1)cout<<"setwise coprime"<<endl;
        else cout<<"not coprime"<<endl;
    }
    return 0;
}
