#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 1000005;
vector<int>ff[1000005];
void getprim(){
    for(int i=2;i*i<=1000000;i++){
        if(!ff[i].size())
        for(int j=i;j<=1000000;j+=i)
            ff[j].push_back(i);
    }
}
int a[maxn];
int visit[maxn]={0};
int main()
{
    getprim();
    int n;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >>a[i];
    }
    int prim = a[0];
    for(int i=0;i<n;i++){
        prim = __gcd(prim,a[i]);
        if(prim==1)
            break;
    }
    int flag = 1;
    for(int i=0;i<n;i++){
        for(auto v:ff[a[i]]){
            //cout <<v <<endl;
            visit[v]++;
            if(visit[v]>1)
                flag =  0 ;
        }
        if(!flag)
            break;
    }
    //cout << prim << " "<< flag << endl;
    if(prim==1&&flag){
        cout <<"pairwise coprime\n";
    }
    else if(prim==1){
        cout << "setwise coprime\n";
    }
    else
        cout <<"not coprime\n";
    return 0;
}
