v#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bitset>
using namespace std;
#define INF 2000000007
#define LINF 1000000000000000007
#define MOD 1000000007
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define repb(i, n) for (int i = n - 1; i >= 0; i--)
#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define ARDEB(i,X) cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define ARDEB(i,X) {}
#define END {}
#endif
//typedef long long int ll;
typedef pair<int,int> P;
struct edge{int to,cost;};
int ceil2(int a,int b){if(a%b){return a/b+1;}else{return a/b;}}

using namespace std;

struct UnionFind {
    vector<int> par; 
    vector<int> sizes;
    UnionFind(int N) : par(N),sizes(N,1) { 
        for(int i = 0; i < N; i++) par[i] = i;
    }

    int root(int x) { 
        if (par[x] == x) return x;
        return par[x] = root(par[x]);
    }

    void unite(int x, int y) { 
        int rx = root(x); 
        int ry = root(y); 
        if (rx == ry) return; 
        if (sizes[rx]<sizes[ry])swap(rx,ry);
        par[ry] = rx; 
        sizes[rx]+=sizes[ry];
    }

    bool same(int x, int y) { 
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
    
    int size(int x){
        return sizes[root(x)];
    }

};

//最大公約数
int gcd(int a,int b){
    
    if(a==0 || b==0)return 0;
    if(a<b){
        int sw;
        sw=a;
        a=b;
        b=sw;
    }
    
    int r;
    while((r=a%b)!=0){
        a=b;
        b=r;
    }
    return b;
}
//最小公倍数
int lcm(int a,int b){


    if(a==0 || b==0)return 0;

    return a/gcd(a,b)*b;

}

int n,k,ans,sum;

int a[1111111],flag[1111111];

signed main(){
	int maxnum=0;
	cin>>n;
	rep(i,n){
		cin>>a[i];
		maxnum=max(a[i],maxnum);
		flag[a[i]]++;
	}
	int pc=1;
	for(int i=2;i<=maxnum;i++){
		int cnt=0;
		for(int j=0;j<=maxnum;j+=i){
			if(flag[j]){
				cnt+=flag[j];
				//cout<<j<<endl;
			}
		}
		if(cnt>=2){
			pc=0;
			break;
		}
	}
	int sc=1;
	int GCD=a[0];
	rep(i,n){
		GCD=gcd(GCD,a[i]);
	}
	if(GCD!=1)sc=0;
	if(pc==1)cout<<"pairwise coprime"<<endl;
	else if(pc==0 && sc==1)cout<<"setwise coprime"<<endl;
	else cout<<"not coprime"<<endl;
}
