#include <bits/stdc++.h>

#define endl '\n'

using namespace std;
using ll = long long int;

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

int main(){

    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    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]--;

                if ((i != 1 and num/i != 1) and (factors[i] > 1 or factors[num/i] > 1)){
                    int gcd = 0;

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

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

                    return 0;
                }
            }

        }
    }

    puts("pairwise coprime");

    return 0;
}