#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const double eps = 1e-8;
const int NINF = 0xc0c0c0c0;
const int INF = 0x3f3f3f3f;
const ll mod  = 1e9 + 7;
const ll N = 1e6 + 5;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n,all=0;
    vector<bool> cnt(N);
    cin>>n;
    for(int i=1;i<=n;i++){
    	int x;cin>>x;
    	cnt[x]++;
    	all=gcd(all,x);
    }
    bool ok=true;
    for(int i=2;i<N&&ok;i++){
    	int sum=0;
    	for(int j=i;j<N;j+=i) sum+=cnt[j];
		if(sum>1) ok=false;
    }
    cout<<(ok?"pairwise coprime":all==1?"setwise coprime":"not coprime");
    return 0;
}