#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int ar[n+1];
    for(int i=1;i<=n;i++)
        cin>>ar[i];
    int gcd=ar[1];
    for(int i=2;i<=n;i++)
        gcd=__gcd(gcd,ar[i]);
    map<int,int>mp;
    int flag=0;
    for(int i=1;i<=n;i++)
    {
        if(mp[ar[i]]==0)
            mp[ar[i]]=1;
        else
        {
            flag=1;
            break;
        }
        for(int j=2;j*j<=ar[i];j++)
        {
            if(ar[i]%j==0)
            {
                if(mp[j]==0)
                    mp[j]=1;
                else
                {
                    flag=1;
                    break;
                }
                if(j*j!=ar[i])
                {
                    if(mp[ar[i]/j]==0)
                        mp[ar[i]/j]=1;
                    else
                    {
                        flag=1;
                        break;
                    }
                }
            }
        }
    }
    if(flag==0)
        cout<<"pairwise coprime"<<endl;
    else if(gcd==1)
        cout<<"setwise coprime"<<endl;
    else
        cout<<"not coprime"<<endl;
    mp.clear();
    return 0;
}
