///Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define        u64             uint64_t
#define        ll              long long
#define        endl            "\n"
#define        PI              acos(-1)
#define        fi              first
#define        si              second
#define        mkp             make_pair
#define        pb              push_back
#define        set0(arr)       memset(arr, 0, sizeof(arr))
#define        setinf(arr)     memset(arr, 126, sizeof(arr))
#define        all(x)          (x).begin(),(x).end()
#define        sz(v)           ((int)(v).size())
#define        IOS             ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;
using          pll        =      pair<ll, ll> ;
using          vl         =      vector<ll> ;
using          vpll       =      vector<pll> ;
using          mll        =      map<ll, ll> ;
using          mcl        =      map<char, ll> ;
using          msl        =      map<string,ll> ;
using          sl         =      set<ll> ;
using          sc         =      set<char> ;
using          dl         =      deque<ll> ;
const int N = 1e6+5 ;

ll      mod = 1e9+7 ;
vl      adj[N] ;
vpll    adjc[N] ;
ll      vis[N] ;
ll      arr[N],arr1[N] ;

ll lcm(ll a,ll b)
{
     return ((a*b)/__gcd(a,b));
}

int main()
{
    IOS;
    ll a, b, c, d, n, m, p, x, y, z, i, j, k, f = 0, tc, cnt = 0, sum = 0, mul = 1, mi = 1e18, ma = -1e18;
    string   str ;
    char     ch ;
    double   db ;
    ll       l, r ;
    //code
        cin>>n;
        sl st;
        for(i=0;i<n;i++)
        {
            cin>>arr[i];
        }
        f=0;
        for(i=0;i<n;i++)
        {
               for(j=i+1;j<n;j++)
               {
                      a=arr[i];
                      b=arr[j];
                      x=__gcd(a,b);
                      if(x!=1)
                      {
                             f=1;break;
                      }
               }
               if(f==1) break;
        }


        if(f==0)
        {
               cout<<"pairwise coprime\n";
               return 0;
        }



        x=__gcd(arr[0],arr[1]);
        for(i=2;i<n;i++)
        {
               x=__gcd(x,arr[i]);
        }
        if(x==1)
        {
               cout<<"setwise coprime\n";
        }
        else
        {
               cout<<"not coprime\n";
        }


    //code
    return 0;
}


