#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,i;
    cin>>n;
    vector<unsigned long long int> a(n);
    for(unsigned long long int& x: a)
        cin>>x;

    unsigned long long int gcd=__gcd(a[0],a[1]), pdt=a[0]*a[1];
    unsigned long long int lcm=pdt/gcd;
    for(i=2;i<n;i++)
    {
        gcd=__gcd(gcd,a[i]);
        lcm=(a[i]*lcm)/__gcd(a[i],lcm);
        pdt*=a[i];
    }
    //cout<<"all gcd: "<<gcd<<endl;
    if(gcd!=1)
        cout<<"not coprime\n";
    else if(pdt==lcm)
        cout<<"pairwise coprime\n";
    else
        cout<<"setwise coprime\n";
    return 0;
}
