#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define ll long long
#define ll_MAX LONG_LONG_MAX
#define ll_MIN LONG_LONG_MIN
#define pi pair<int, int>
#define endl "\n"
#define MAXN 100005
using namespace std;

int n, x;
vector<int> v;
map<int,int> m;

void solve()
{
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> x;
        v.pb(x);
    }
    int flag=0;
    for(int i=0;i<n;i++)
    {
        for(int j=2;j*j<=v[i];j++)
        {
            if(v[i]%j==0)
            {
                m[j]++;
                if(m[j]==2)
                {
                    flag=1;
                    break;
                }
            }
        }
        if(flag==1) break;
    }
    if(flag==0)
    { 
        cout<<"pairwise coprime"<<endl; 
        return;
    }
    int temp = 0;
    for (int i = 0; i < n; i++)
    {
        temp = __gcd(temp, v[i]);
    }
    if(temp==1)
    {
        cout<<"setwise coprime"<<endl;
        return;
    }
    cout<<"not coprime"<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    solve();
}