#include<bits/stdc++.h>
using namespace std;
int cnt[1000*1000+2];
bool ok;
void factorize(int n)
{
//    cout<<n<<"*"<<endl;
    if(n%2==0)
    {
        while(n%2==0) n/=2;
        cnt[2]++;
        if(cnt[2]>1) ok=0;
//        cout<<2<<endl;
    }
    for(int i=3;i*i<=n;i+=2)
    {
        if(n%i==0)
        {
            while(n%i==0) n/=i;
            cnt[i]++;
            if(cnt[i]>1) ok=0;
//            cout<<i<<endl;
        }
    }
    if(n>2)
    {
        cnt[n]++;
        if(cnt[n]>1) ok=0;
//        cout<<n<<endl;
    }
}
int32_t main()
{
    int n;scanf("%lld",&n);
    vector <int> N(n);
    int cgcd=0;ok=1;
    for(int &x : N) scanf("%lld",&x),cgcd=__gcd(cgcd,x);
    for(int x : N) {factorize(x);if(!ok) break;}
    if(ok) printf("pairwise coprime\n"),exit(0);
    if(cgcd==1) printf("setwise coprime\n"),exit(0);
    printf("not coprime\n");
    return 0;
}
/*


*/

