#include <bits/stdc++.h>

using namespace std;

#define ll long long
#define F first
#define S second
#define ii pair < int , int >

const int N=1e6+9;
vector<int> v[N];
int a[N];
int main()
{
    int g=0;
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",a+i);
        g=__gcd(g,a[i]);
        for(int j=1;j*j<=a[i];j++){
            if(a[i]%j==0){
                v[j].push_back(i);
            }
        }
    }
    bool q=0;
    for(int i=0;i<n;i++){
      for(int j=2;j*j<=a[i];j++){
            if(a[i]%j==0){
                if(lower_bound(v[j].begin(),v[j].end(),i+1)-v[j].begin() != v[j].size()){
                    q=1;
                    break;
                }
            }
        }
    }
    if(!q){
        cout<<"pairwise coprime";
    }
    else if(g==1){
        cout<<"setwise coprime";
    }
    else{
        cout<<"not coprime";
    }
}
