#include <bits/stdc++.h>
using namespace std;
#define M_PI 3.14159265358979323846
#define MOD 1000000007
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<int, int> ipair;
typedef pair<ll, ll> llpair;

/*
    Author: Koushik Sahu
    Created: 29 August 2020 Sat 18:03:49
*/

int n, a[1000001];
bool divisors[1000001];

int main(){
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    cin>>n;
    int whole = -1;
    bool pairwise = true;
    fill_n(divisors, 1000001, false);
    for(int i=0; i<n; i++){
        cin>>a[i];
        if(divisors[a[i]]){
            pairwise = false;
        }else{
            for(int j=2; j<=sqrt(a[i]); j++){
                if(a[i]%j==0){
                    int x = j;
                    int y = a[i]/j;
                    if(divisors[x]){
                        pairwise = false;
                    }else{
                        divisors[x] = true;
                    }
                    if(x!=y){
                        if(divisors[y]){
                            pairwise = false;
                        }else{
                            divisors[y] = true;
                        }
                    }
                }
            }
            divisors[a[i]] = true;
        }
        if(whole==-1){
            whole = a[i];
        }else{
            whole = __gcd(whole, a[i]);
        }
    }
    if(pairwise){
        cout<<"pairwise coprime\n";
    }else if(whole==1){
        cout<<"setwise coprime\n";
    }else{
        cout<<"not coprime\n";
    }
    return 0;
}