#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
  	ll spf[1000002]={};
  	for(int i=2;i*i<=1000000;i++)
    {
        if(spf[i]==0)
        {
            for(int j=i;j<=1000000;j+=i)
            {
                if(spf[j]==0)
                spf[j]=i;
            }
        }
    }
    ll n,i;
    cin>>n;
    ll a[n];
    for(i=0;i<n;i++)
    cin>>a[i];
    ll G=__gcd(a[0],a[1]);
    for(i=2;i<n;i++)
    G=__gcd(G,a[i]);
    if(G!=1)
    {
        cout<<"not coprime"<<endl;
        return 0;
    }
    ll freq[1000002]={};
    ll flag=0;
    for(i=0;i<n;i++)
    {
        freq[spf[a[i]]]++;
        if(freq[spf[a[i]]]>1)
        {
            flag=1;
            break;
        }
    }
    if(flag)
    {
        cout<<"setwise prime"<<endl;
    }
    else
    {
        cout<<"pairwise prime"<<endl;
    }
  	return 0;
}