#include<bits/stdc++.h>
#define F first
#define S second
#define ll long long
#define pb push_back

using namespace std;

const int N=1e6+5;

int n,a[N],freq[N];

bool prime[N];

int main()
{
    cin >> n;
    int gcd=0;
    for (int i=0; i<n; i++)
    {
        cin >> a[i];
        gcd=__gcd(gcd,a[i]);
        for (ll j=2; j*j<=a[i]; j++)
        {
            if (a[i]%j==0)
            {
                freq[j]++;
                while(a[i]%j==0)
                {
                    a[i]/=j;
                }
            }
        }
        freq[a[i]]++;
    }
    if (*max_element(freq+2,freq+N)==1)cout << "pairwise coprime\n";
    else if (gcd==1)cout << "setwise coprime\n";
    else cout << "not coprime\n";
    return 0;
}
