#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <tuple>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cassert>
#include <numeric>
using namespace std;

#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define rept(i,k,n) for(long long i = (k); i < (long long)(n); i++)
#define All(v) v.begin(), v.end()
#define Sort(v) sort(v.begin(),v.end())
#define Rsort(v) sort(v.begin(),v.end(),[](auto a, auto b) { return a > b; })
#define Reverse(v) reverse(v.begin(),v.end())
#define MAX 1000000007
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<long long,long long> Pll;
typedef tuple<int,int,int> Tii;

template <typename T>
ostream& operator<<(ostream& s, const vector<T> &vec){
    for(int i=0;i<vec.size();i++){
        if(i) s << ',';
        else s << '{';
        s <<setw(2)<< vec[i];
    }
    s << '}' << endl;
    return s;
}

void isprime(vector<bool> &isprime){
    int n=isprime.size();
    isprime[0]=false;
    isprime[1]=false;
    for(int i=2;i<=sqrt(n)+1;i++)
        if(isprime[i])
            for(int j=i*2;j<n;j+=i) isprime[j]=false;
}
int main(){
    int n;
    cin>>n;
    int mx=1000;
    vector<int> a(n);
    rep(i,n) cin>>a[i];
    int cd=a[0];
    rep(i,n) cd = gcd(cd,a[i]);
    vector<bool> ip(mx,true);
    isprime(ip);
   // cout<<ip;
    if(cd==1){
        bool b = false;
        rep(p,mx){
            if(!ip[p]) continue;
            int cnt=0;
            rep(i,n){
                if(a[i]%p==0) cnt++;
            }
            if(cnt>1) {
                b=true;
                break;
            }
        }
        if(b) cout<< "setwise coprime"<<endl;
        else cout<<"pairwise coprime"<<endl;
    }
    else cout<<"not coprime"<<endl;
    return 0;
}