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

const int mod = 1e9+7;

const int N = 200200;

int gcd (int a, int b) {
    if (b == 0)
        return a;
    else
        return gcd (b, a % b);
}

signed main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);

    int n;
    cin>>n;
    int a[n];
    for (int i=0; i<n; i++) cin>>a[i];

    int pairwise = 1;
    int mul = 1;
    for (int i=0; i<n; i++){
        int g = gcd(mul , a[i]);
        if (g!=1) {
            pairwise = 0;
            break;
        }
        mul *= a[i];
    }

    if (pairwise) {
        cout<<"pairwise coprime"<<endl;
    }
    else {
        int g = a[0];
        for (int i=1; i<n; i++){
            g = __gcd(g, a[i]);
        }
        if (g==1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }

    return 0;
}
