#include<bits/stdc++.h> 
using namespace std;
typedef long long ll;
template<typename T1,typename T2> bool chmin(T1 &a,T2 b){if(a<=b)return 0; a=b; return 1;}
template<typename T1,typename T2> bool chmax(T1 &a,T2 b){if(a>=b)return 0; a=b; return 1;}
int dx[4]={0,1,-1,0};
int dy[4]={1,0,0,-1};

bool p[1001000];
bool used[1000100];

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);

    ll g = 0;
    int n;
    cin>>n;
    vector<int> pri;
    for(int i=2;i*i<=1000000;i++){
        if(p[i] == false){
            pri.push_back(i);
            for(int j=i+i;j<=1000000;j+=i)p[j] = false;
        }
    }

    ll a[n];
    bool pos = 1;
    for(int i=0;i<n;i++){
        cin>>a[i];
        g = gcd(g,a[i]);
        if(pos){
            for(auto j:pri){
                if(a[i] % j == 0){
                    if(used[j])pos=false;
                    used[j] = 1;
                }
            }
        }
    }
    if(pos)cout<<"pairwise coprime"<<endl;
    else if(g == 1)cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;

}