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