#include <bits/stdc++.h>

#define endl '\n'

using namespace std;
using ll = long long int;

vector<int> factors(1e6, 0);

int main(){

    int n;
    cin >> n;

    vector<int> values(n);
    for(auto &v: values) cin >> v;

    for (int p=0; p<n; p++){
        int num = values[p];

        for (int i=1; i*i <=num; i++){
            if (num % i == 0){
                factors[i]++;
                factors[num / i]++;

                if (i == num/i) factors[i]--;
            }
        }
    }

    // for (int i=0; i<10; i++) cout << factors[i] << " ";
    // cout  << endl;

    for (int i=2; i<=1e6; i++){
        if (factors[i] > 1) {
            
            int gcd = 0;

            for (int i=0; i<n; i++){
                gcd = __gcd(gcd, values[i]);
            }

            if (gcd == 1) puts("setwise coprime");
            else puts("not coprime");

            return 0;
        }
    }

    puts("pairwise coprime");

    return 0;
}