/**So..a**/
#include<bits/stdc++.h>

using namespace std;
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#define PB(x, v) x.push_back(v);
#define M_P(a, b) make_pair(a, b)
#define pll pair<ll, ll>
#define ll long long
#define mll map<ll, ll>
#define vl vector<ll>
#define fa(x, v) for(auto x: v)
#define fr(i, a, b) for(int i= a;i <=b; i++)
#define TEST  ll Test; cin >> Test; while(Test--)

#define B_ begin()
#define E_ end()
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define NL_ "\n"
#define F first
#define S second
#define FF first.first
#define FS first.second
#define SF second.first
#define SS second.second

#define mod(a) a%1000000007

#define  ull unsigned long long
#define MAX  1000010

ll prime[MAX];
ll arr[MAX];

bool div(ll n)
{
    bool ans = true;
    ll r= n;
    if(n%2==0)
    {
        if(prime[2])
            ans = false;
        prime[2] = 1;
        while(n%2==0)
            n/=2;
    }
    ll i=3;
    while(i*i<=r)
    {
        if(n%i==0)
        {
            if(prime[i])
                ans = false;
            prime[i] = 1;
            while(n%i==0)
                n/=i;

        }
        i+=2;
    }
    return ans;


}


int main()
{

    FAST;
    fr(i, 1, MAX-1) prime[i] = 0;
    ll n;
    cin >> n;
    fr(i, 1, n) cin>> arr[i];
    ll ans = true;
    fr(i, 1, n)
    {
        ans = (ans && div(arr[i])) ;
    }
    if(ans)
    {
        cout <<"pairwise coprime";
    }
    else
    {
        ll gcd  = 0;
        fr(i, 1, n) gcd = __gcd(gcd, arr[i]);
        if(gcd==1)
            cout << "setwise coprime";
        else
            cout <<"not coprime";
    }


    return 0;
}
