#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n;
    cin>>n;
    vector<int>arr(n);
    for(int i=0; i<n; i++)
        cin>>arr[i];
    int var=arr[0];
    for(int i=1; i<n; i++)
        var=__gcd(arr[i],var);
    if(var>1)
        cout<<"not coprime";
    else{
        if(n>=800000)
            cout<<"setwise coprime";
        else{
            set<int>num;
            for(int i=0; i<n; i++){
                int temp=arr[i];
                for(int j=2; j*j<=arr[i]; j++){
                    if(arr[i]%j==0){
                        temp=j;
                        break;
                    }
                }
                num.insert(temp);
            }
            if(num.size()==n)
                cout<<"pairwise coprime";
            else
                cout<<"setwise coprime";
        }
    }

    return 0;
}