#include <bits/stdc++.h>
using namespace std;
#define ll long long

int main()
{
    ll int n, i, j, k, flag=0;
    cin>>n;
    ll int arr[n];
    for(i=0; i<n; i++){
        cin>>arr[i];
    }
    
    for(i=1, k=arr[0]; i<n; i++){
        k = __gcd(k, arr[i]);
    }
    if(k!=1) cout<<"not coprime";
    else{
        for(i=0; i<n-1; i++){
            for(j=i+1; j<n; j++){
                if(__gcd(arr[i],arr[j]) != 1) {
                    flag++;
                    break;
                }
            }
            if(flag>0) break;
        }
        if(flag==0) cout<<"pairwise coprime";
        else cout<<"setwise coprime";
    }
    return 0;
}