#include<bits/stdc++.h>
#define ll long long int
using namespace std;
ll i, temp,t, n,j, a[200600], ans, g, C[200010];
bool cond;
char c;
string s;
void solve(ll x)
{
    if(cond)
        return;
    for(j=1;j*j<=x;j++)
    {
        if(x%j==0)
        {
            ll a = j;
            ll b = x/j;
            if(a==b)
            {
                a = j;
                b = 1;
            }
            if(a!=1)
            {
                if(C[a])
                {
                    cond = true;
                  //  cout << "Here 1  " << a <<endl;
                    return;
                }
                C[a]++;
                //cout << "a = "<< a << endl;
            }
            if(b!=1)
            {
                if(C[b])
                {
                    cond = true;
                    //cout << "Here 2" <<" "<< b <<" "<<x <<" "<<C[b]<<endl;
                    return;
                }
                C[b]++;
                //cout << "b = " << b << endl;
            }
        }
    }
}
int main()
{
    //I am Monim, a tiny creature of Allah
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    cin >> n;
    for(i=0;i<n;i++)
        cin >> a[i];
    g = a[0];
    solve(a[0]);
    for(i=1;i<n;i++)
    {
        solve(a[i]);
        g = __gcd(g,a[i]);
    }
    if(!cond)
        cout << "pairwise coprime";
    else if(g==1)
        cout << "setwise coprime";
    else
        cout << "not coprime";
    return 0;
}
