#include <bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define ff           first
#define ss           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define hell        1000000007
#define rep(i,a,b)  for(int i=a;i<b;i++)
using namespace std;
 
// Most important thing in CP - Have Fun :)
unordered_set<int>st;
int ok; 
 
void check(int x){
    for (int i = 1 ; i<sqrt(x)+1 ;i++){
        if (i==1){
            if (st.count(x)){ok = 0;return;}
            else st.insert(x);
        }
        else{
            if (x%i==0){
                if (x/i==i){
                    if (st.count(i)){ok = 0;return;}
                    else st.insert(i);
                }
                else{
                    if (st.count(i) || st.count(x/i)){ok = 0;return;}
                    else{
                        st.insert(i);
                        st.insert(x/i);
                    }
                }
            }
        }
    }
}
void solve(){
	//write here
    int n;
    cin>>n;
    vi arr(n);
    rep(i,0,n)cin>>arr[i];
    int gcd = arr[0];
    st.insert(arr[0]);
    ok = 1;
    for (int i = 1 ; i <n ; i++){
        if (ok==1)check(arr[i]);
        gcd = __gcd(gcd,arr[i]);
    }
    if (ok)cout<<"pairwise coprime"<<endl;
    else if (gcd==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}
 
int main(){
	cin.tie(NULL);
	ios::sync_with_stdio(false);
	//insert code
	
		solve();
	return 0;
}