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

int main(){
    
    int n;
    cin>>n;
    int arr[n];
    
    int gcd=0;
    for(int i=0;i<n;i++){
        cin>>arr[i];
        gcd = __gcd(gcd,arr[i]);
    }
    if(gcd != 1){
        cout<<"not coprime"<<endl;
        return 0;
    }
    // bool flag=false;
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            if(__gcd(arr[i],arr[j])!=1){
                cout<<"setwise coprime"<<endl;
                return 0;
            }  
        }
    }
    cout<<"pairwise coprime"<<endl;
    return 0;
    
}
