#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;
    for(int i=1;i<=n;i++)
    {
        for(int j=2;j*j<=ar[i];j++)
        {
            if(ar[i]%j==0)
            {
                mp[j]++;
                while(ar[i]%j==0)
                    ar[i]/=j;
            }
        }
        if(ar[i]>0)
            mp[ar[i]]++;
    }
    int flag=0;
    for(int i=1;i<=1000000;i++)
    {
        if(mp[i]>1)
        {
            flag=1;
            break;
        }

    }
    if(gcd==1)
    {
        if(flag==1)
            cout<<"setwise coprime"<<endl;
        else
            cout<<"pairwise coprime"<<endl;
    }
    else
        cout<<"not coprime"<<endl;
    mp.clear();
    return 0;
}
