#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1.0)
#define pb push_back
#define mp make_pair
#define ll long long
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define testcase ll T; cin >> T; for (ll tc = 1; tc <= T; tc++)
#define M 1000000007
#define MM 998244353
#define eps 1e-8
#define eq(x,y) (fabs((x)-(y)) < eps)
#define r2 1.41421356237
ll powmod(ll a,ll b,ll mod) {ll res=1;a%=mod;assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}

#define sizes 1000000
bool a[sizes+3]={};
vector<int>v[sizes];

int main()
{
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  //testcase {
  vector<int> prime;
    prime.pb(2);
    for(long long i=4;i<=sizes;i+=2) { a[i]=1; }
    for(long long i=3;i<=sizes;i+=2) {
      if(a[i]==0) {
        prime.pb(i);
        for(long long j=i*i;j<=sizes;j+=i) {
          a[j]=1;
        }
      }
    }
    int n,g=0;
    bool ok=1;
    cin>>n;
    for(int i=0;i<n;i++) {
    	int q;
    	cin>>q;
    	g=__gcd(g,q);
    	if(!a[q]) { v[q].pb(i); }
    	else {
    		int p=0;
    		while(p<prime.size()) {
    			if(q%prime[p]==0) { v[prime[p]].pb(i); while(q%prime[p]==0) { q/=prime[p]; } }
    			else if(q==1) { break; }
    			else if(!a[q]) { v[q].pb(i); break; }
    			else { p++; }
    		}
    	}
    }
    for(int i=2;i<6;i++) { if(v[i].size()>1) { ok=0; break; } }
    if(ok) { cout<<"pairwise coprime"; }
	else if(g==1) { cout<<"setwise coprime"; }
	else { cout<<"not coprime"; }
	//}  
  return 0;
}