#include<bits/stdc++.h>
#define cases long long t;cin>>t;while(t--)
#define f_io ios::sync_with_stdio(false); cin.tie(0)
#define foi(a,n) for(long long i=a;i<n;i++)
#define foj(a,n) for(long long j=a;j<n;j++)
#define fok(a,n) for(long long k=a;k<n;k++)
#define ll long long
#define MOD 1000000007
#define INF 1000000000
using namespace std;

int main()
{
    f_io;
    vector<ll> primes(1000001);
    foi(2,100001)
    {
        if(!primes[i])
        {
            primes[i] = i;
            ll j = i*2;
            while(j<1000001)
            {
                primes[j] = i;
                j+=i;
            }
        }
    }
    ll n;
    cin >> n;
    vector<ll> arr(n);
    foi(0,n)
        cin >> arr[i];
    ll gcd = arr[0];
    foi(1,n)
        gcd = __gcd(gcd,arr[i]);
    if(gcd==1)
    {
        bool ck = true;
        unordered_map<ll,bool> mp;
        foi(0,n)
        {
            while(primes[arr[i]]>1)
            {
                ll x = primes[arr[i]];
                if(mp[x])
                {
                    ck = false;
                    break;
                }
                while(arr[i]%x==0)
                    arr[i]/=x;
                mp[x] = true;
            }
        }
        if(ck)
            cout << "pairwise coprime";
        else
            cout << "setwise coprime";
    }
    else
        cout << "not coprime";
    return 0;
}
