
#include<bits/stdc++.h>
using namespace std ;


#define vt vector
#define all(c) (c).begin(), (c).end()
#define sz(x) (int)(x).size()
#define ll long long
#define ld long double
#define ar array
#define inf() ifstream cin("d.txt")
#define onf() ofstream cout("test.txt")
#define mod 1000000007
#define pb push_back
#define endl cout<<"\n";
#define prt1(a) cout<<a<<" "
#define prt2(a,b) cout<<a<<" "<<b<<" "
#define prt3(a,b,c) cout<<a<<" "<<b<<" "<<c<<" "
#define in(a) cin>>a
#define inn(a,b) cin>>a>>b
#define innn(a,b,c) cin>>a>>b>>c 
#define rep(i,st,end) for(int i=st;i<end;i++)
#define repv(i,st,end) for( i=st;i>=end;i--)
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define TEST ll tc;cin>>tc;while(tc--)
#define EACH(x, a) for (auto& x: a)

template<class A> void read(vt<A>& v);
template<class A, size_t S> void read(ar<A, S>& a);
template<class T> void read(T& x) {
    cin >> x;
}
void read(double& d) {
    string t;
    read(t);
    d=stod(t);
}
void read(long double& d) {
    string t;
    read(t);
    d=stold(t);
}
template<class H, class... T> void read(H& h, T&... t) {
    read(h);
    read(t...);
}
template<class A> void read(vt<A>& x) {
    EACH(a, x)
        read(a);
}
template<class A, size_t S> void read(array<A, S>& x) {
    EACH(a, x)
        read(a);
}

void solve()
{
    ll n;
    read(n);
    vt<ll>v(n);
    read(v);
    ll g= v[0];
    rep(i,1,n)
    g=__gcd(g,v[i]);

    if(g!=1)
      cout<<"not coprime";
    else
    {
      ll f = 0;
      ll mp[200000]={0};
      rep(i,0,n)
      {
        ll x = v[i];
        ll cnt = 0;
        while(x%2==0)
        {
          x =x/2;
          cnt++;
        }
        if(cnt>0 && mp[2]!=0)
        {
          f=1;
          break;
        }
        mp[2] = cnt;
        cnt = 0;
        for(int j = 3;j<=sqrt(x);j+=2)
        {
          cnt = 0;
          while(x%j==0)
          {
            x=x/j;
            cnt++;
          }
          if(cnt>0 &&mp[j]!=0)
          {
            f=1;
            break;
          }
          mp[j]=cnt;
        }
        cnt = 0;
        if(x>2)
        {
          if(cnt>0 and mp[x]!=0)
          {
            f=1;
            break;
          }
          mp[x] = 1;
        }
      }
      if(f==1)
        cout<<"setwise coprime";
      else
        cout<<"pairwise coprime";
    }
}

 int main()
 {
    fio;
    ll k = 1;
    ll tc;
    tc = 1;
    while(tc--) {
       // cout<<"Case #"<<k<<": ";k++;
        solve();
        endl;
    }
    
 }


