#include<bits/stdc++.h>
using namespace std;
 
typedef vector <int> vi;
typedef set <int> se;
#define endl "\n"
#define for(i,a,b) for(int i = a;i<b;i++)
#define all(v) v.begin(),v.end()
#define ff first
#define ss second
#define ll long long
#define mod 1000000007
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

bool setw(int *a,int n){
    int g = a[0];
    for(i,1,n){
        g = __gcd(a[i],g);
        
    }
    if(g!=1) return false;
    return true;
}

bool pairw(int *a,int n){
    
    for(i,0,n){
        for(j,i+1,n){
            if((__gcd(a[i],a[j])!=1)) return false;
        }
    }
    return true;
}

int main()
{ int n;
    cin>>n;
    int a[n];
    for(i,0,n) cin>>a[i];
    if(pairw(a,n)) cout<<"pairwise coprime"<<endl;
    else if(setw(a,n)) cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
 
 
return 0;
   
}