#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, gcd;
    cin >> n;
    int a[n], p[2000010];
    bool pairwise = true;
    for (int i = 0; i < 2000010; i++) p[i] = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        if (i == 0) gcd = a[i];
        gcd = __gcd(a[i], gcd);
        p[a[i]]++;
    }
    for (int i = 2; i < n; i++)
    {
        int sum = 0;
        for (int j = i; j < n; j += i)
        {
            sum += p[j];
            if (sum > 1)
            {
                pairwise = false;
                break;
            }
        }
        if (pairwise == false) break;
    }
    if (pairwise == true) cout << "pairwise coprime";
    else if (gcd == 1) cout << "setwise coprime";
    else cout << "not coprime";
}