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

typedef long long unsigned llu;

llu __lcm(llu a,llu b){
    return (a*b)/__gcd(a,b);
}

int main(){
    int n;
    cin>>n;
    llu arr[n];
    
    llu gcd = 0;
    llu lcm = 1;
    llu prod = 1;
    for(int i=0;i<n;i++){
        cin>>arr[i];
        gcd = __gcd(gcd,arr[i]);
        lcm = __lcm(lcm,arr[i]);
        prod = prod*arr[i];
    }
    if(lcm == prod){
        cout<<"pairwise coprime\n";
    }
    else if(gcd == 1){
        cout<<"setwise coprime\n";
    }
    else{
        cout<<"not coprime\n";
    }
    return 0;
}