#include "bits/stdc++.h"

using namespace std;
using ll = long long;
int a[1000005];
unordered_map<int, int> mp;
int main() {
#ifdef LOCAL
    freopen("in1.txt", "r", stdin);
    freopen("out1.txt", "w", stdout);
#endif

    int n;
    cin >> n;

    for(int i = 0; i < n; i++){
        cin >> a[i];
        mp[a[i]] = 1;
    }
    bool dyh = false;
    for(int i = 2; i < 1000005; i++){
        bool flag = false;
        for(int j = 1; i * j < 1000005; j++){
            if(mp[i * j] == 1 and flag) {
                dyh = true;
                break;
            }
            if(mp[i * j] == 1 and !flag) flag = true;
        }
    }
    if(dyh){
        int tmp = a[0];
        for(int i = 1; i < n; i++){
            tmp = __gcd(tmp, a[i]);
        }
        if(tmp == 1){
            puts("setwise coprime");
        }else puts("not coprime");
    }
    else {
        puts("pairwise coprime");
    }
    return 0;
}