#pragma GCC target ("avx2")
#pragma GCC optimize "trapv"
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
#define input(a,n) for(ll i1=0;i1<n;i1++)cin>>a[i1]
#define ll long long
#define pi 2 * acos(0.0)
#define usll unordered_set<ll>
#define sll set<ll>
#define vll vector<ll>
#define mll map<ll,ll>
#define pll pair<ll,ll>
#define umll unordered_map<ll,ll>
#define S second
#define sz size()
#define all(v) v.begin(),v.end()
#define Y cout<< "YES"<< "\n"
#define N cout<< "NO"<< "\n"
#define F first
#define mp make_pair
#define pb push_back
#define pf push_front
#define ld long double
#define mod 1000000007
using namespace std;
ll h[1000001];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n;
    cin>>n;
    for(ll i=1;i<=1000000;i++)
    {
        h[i]=i;
    }
    ll a[n],mx=INT_MIN,f=1,g;
    umll m;
    sll s;
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]>mx)
        mx=a[i];
    }
    g=a[0];
    for(ll i=1;i<n;i++)
    {
        g=__gcd(g,a[i]);
    }
    if(g==1)
    {
        for(ll i=2;i*i<=mx;i++)
       {
           if(h[i]==i)
           {
               for(ll j=2*i;j<=mx;j+=i)
               {
                   if(h[j]==j)
                   {
                       h[j]=i;
                   }
               }
           }
       }
       for(ll i=0;i<n;i++)
       {
          s.insert(h[a[i]]);
       }
       if((ll)s.sz==n)
         cout<< "pairwise coprime";
       else
         cout<< "setwise coprime";
    }
    else
    {
        cout<< "not coprime";
    }
    return 0;
}
