#include<bits/stdc++.h>
using namespace std;
#define pb          push_back
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define endl        "\n"
#define fast        ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define int         long long int
#define mod         1000000007
#define test        int t;cin>>t;while(t--)
#define REP(i,a,b)  for(int i=a,i<=b;i++)
#define MAXN        200001

int32_t main()
{
    fast;
    int n;cin>>n;
    int arr[n];

    for(int i=0;i<n;i++){
        cin>>arr[i];
    }

    set<int>s;
    int gcd=arr[0];
    for(int i=1;i<n;i++){
        gcd=__gcd(gcd,arr[i]);
    }

    if(gcd!=1){
        cout<<"not coprime"<<endl;
    }
    else
    {
        bool ok=false;
        for(int i=0;i<n;i++){

            for(int j=2;j<=sqrt(arr[i]);j++){
                if(arr[i]%j==0){
                    if(s.count(j)){
                        ok=true;
                        break;
                    }
                    else
                    {
                        if(arr[i]/j!=j){
                            s.insert(j);
                            s.insert(arr[i]/j);
                        }
                        else
                            s.insert(j);
                    }
                }
            }
            if(ok)
                break;
        }
        if(ok){
            cout<<"setwise coprime"<<endl;
        }
        else
            cout<<"pairwise coprime"<<endl;
    }

    return 0;
}