#include<bits/stdc++.h>
using namespace std;

#define ff       first
#define ss       second
#define vpop     pop_back
#define pb       push_back
#define mp       make_pair
#define ll       long long int
#define umap	 unordered_map
#define pii	 pair<int, int>
#define clz(x)   __builtin_clz(x)       
#define ctz(x)   __builtin_ctz(x)      
#define all(v)   v.begin(), v.end() 
#define sbts(x)  __builtin_popcount(x) 
#define ull      unsigned long long int
#define ms(a,v)  memset(a, v, sizeof(a))
#define ps(x, y) fixed << setprecision(y) << x
const int MOD  = 1e9 + 7;
const ll  INF  = 1e12;
const int   N  = 1e5 + 1;
int cnt[1000001];

int main() { 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);  cout.tie(NULL);
//  *-------------------------------*
    int n; cin >> n; int arr[n];
    for (int i = 0; i < n; i++) {
        cin >> arr[i];
    }   
    int res = 1, i = 0, g = arr[0];
    for ( ; res && i < n; i++) {
        g = __gcd(g, arr[i]);
        for (int j = 2; j * j <= arr[i]; j++) {
            if (arr[i] % j == 0) {
                cnt[i] += 1;
                int d = arr[i] / j;
                if (d != j)
                    cnt[d] += 1; 
                if (cnt[i] > 1 || cnt[d] > 1) {
                    res = 0;
                    break;
                }
            }
        }
    }
    for (; i < n; i++) {
        g = __gcd(g, arr[i]);
    }
    if (res) cout << "pairwise coprime";
    else if (g == 1) cout << "setwise coprime";
    else cout << "not coprime";
    return 0;
}