//Hey u r too far away to know this
//CHIRAGA196
#include <bits/stdc++.h>
using namespace std;
#define     ff                  first
#define     pb                  push_back
#define     ss                  second
#define     IOS                 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define     all(v)              v.begin(), v.end()
#define     allr(v)             v.rbegin(), v.rend()
#define       int               long long
#define       endl             '\n'
const   int N = 1e6+5, Mod = 1e9 + 7;
int32_t main(){
        IOS;
      
        int n; cin >> n;
        vector<int> v(n);
        for(auto &x:v)
            cin >> x;
        vector<int> a(1000000, 0);
        int anss = 1;

        for(int i = 0; i < n; i++){
            int x = v[i];
            int l = v[i];
            for(int j = 2; j * j <= l; j++){
                if(v[i]%j == 0){
                    if(a[j] == 0){
                        a[j] = 1;
                    }
                    else{
                        anss = 0;
                        break;
                    }
                    if(j != v[i]/j){
                        int rr = v[i]/j;
                        if(a[rr] == 0)
                            a[rr] = 1;
                        else {
                            anss = 0;
                            break;
                        }
                    }
                }
            }
            if(anss == 0)
                break;
        }
        if(anss){
            cout << "pairwise coprime";
            return 0;
        }
        int ansr = v[0];
        for(int i = 0; i < n; i++)
            ansr = __gcd(ansr, v[i]);

        if(ansr == 1){
            cout << "setwise coprime";
            return 0;
        }
        cout << "not coprime";
        return 0;
}