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


const int NMAX = 1e6 + 5;
int a[NMAX], res, n, freq[NMAX], x;


int main() {
    cin >> n;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
        x = a[i];
        for(int j = 2; j * j <= x; j++) {
            if(x % j == 0) {
                freq[j]++;
                while(x % j == 0) {
                    x /= j;
                }
            }
        }
    }
    res = a[1];
    for(int i = 2; i <= n; i++) {
        res = __gcd(res, a[i]);
    }
    if(res > 1) {
        cout << "not coprime\n";
    } else {
        for(int i = 1; i <= 1000000; i++) {
            if(freq[i] > 1) {
                cout << "setwise coprime\n";
                return 0;
            }
        }
        cout << "pairwise coprime\n";
    }
    return 0;
}