#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int MOD = 1000000007;
int main()
{
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin>>n;
  int g=0,a=0,b=0;
  vector<int> d(n,0);
  for(int i=0; i<n; i++){
    cin>>d[i];
    g=__gcd(g,d[i]);
    if(d[i]%2){a++;}
    else{b++;}
  }
  if(g!=1){
    cout<<"not coprime";
  }
  else{
    if(b>=2){
        cout<<"setwise coprime";
    }
    else{
        map<int,int> k;
        for(int i=0; i<n; i++){
                int j=2;
            for( j=2; j*j<d[i]; j++){
                if(d[i]%j==0){
                    k[j]++;
                    if(k[j]>=2){cout<<"setwise coprime"; return 0;}
                    k[d[i]/j]++;
                    if(k[d[i]/j]>=2){cout<<"setwise coprime"; return 0;}
                }
            }
            if(j*j==d[i]){
                k[j]++;
                    if(k[j]>=2){cout<<"setwise coprime"; return 0;}
            }
            k[d[i]]++;
            if(k[d[i]]>=2){cout<<"setwise coprime"; return 0;}

        }
        cout<<"pairwise coprime";
    }
  }

    return 0;
}