#include<bits/stdc++.h>
#define chal ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define mod 1000000007
using namespace std;
bool a[1000000+1];
int main()
{
    int t=1;
    //cin>>t;
    while(t--)
    {
        int n;
        cin>>n;
        int i,g=0,p,flag=0,j,k=0;
        set<int> s;
        for(i=0;i<n;i++)
        {
            cin>>p;
            a[p]++;
            if(a[p]>1)
                flag=1;
            s.insert(p);
            if(i==0)
                g=p;
            else
                g=__gcd(p,g);
        }
        if(flag==0){

            for(i=2;i<=1000000;i++)
            {
                k=a[i];
                for(j=i*2;j<=1000000;j+=i)
                {
                    if(a[j]>0)
                        k++;
                    if(k>1)
                        break;
                }
                if(k>1)
                {
                    flag=1;
                    break;
                }
            }
        }
        if(flag==0)
        {
            cout<<"pairwise coprime";
        }
        else if(g==1)
            cout<<"setwise coprime";
        else
            cout<<"not coprime";
    }
    return 0;
}
