#include<iostream>
#include<vector>
#include<set>
#include<unordered_set>
#include<string>
#include<stack>
#include<algorithm>
#include<limits.h>

using namespace std;


void slove(){
    int n;
    cin>>n;
    vector<int> arr(n);
    for(int i = 0; i < n; ++i){
        cin>>arr[i];
    }

    int curr = arr[n-1];
    bool pairwise = true;
    bool setwise  = true;
    for(int i = n-2; i >= 0; --i){
        curr = __gcd(arr[i],curr);
        if(curr != 1){
            pairwise = false;
            if(i == 0){
                setwise = false;
            }
        }
    }

    if(pairwise){
        cout<<"pairwise coprime"<<endl;
    }else if(setwise){
        cout<<"setwise coprime"<<endl;
    }else{
        cout<<"not coprime"<<endl;
    }
}
int main(){
    slove();
}
