#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7, mod = 1e9 + 7;
typedef long long ll;
vector<int> v;
int ar[maxn];
void prime()
{
	for (int i = 2; i < 1e6 + 1; i++)
		ar[i] = 1;
	for (int i = 2; i * i < 1e6 + 1; i++)
	{
		if (ar[i])
		{
			for (int j = i * i; j < 1e6 + 1; j += i)
				ar[j] = 0;
		}
	}
	for (int i = 2; i < 1e6 + 1; i++) {
        if(ar[i]) v.push_back(i);
	}
}
int n, a[maxn];
map<int,int> mp;
int main() {
    scanf("%d", &n);
    int gcd = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]), gcd = __gcd(gcd, a[i]);
    prime();
    bool f = false;
    for (int i = 1; i <= n && !f; i++) {
        for (int j = 0; j < v.size() && !f; j++) {
            if(a[i] % v[j] == 0) {
                if(mp.count(v[j])) f = true;
                mp[v[j]]++;
            }
        }
    }
    if(!f) printf("pairwise coprime\n");
    else if(f && gcd == 1) printf("setwise coprime\n");
    else printf("not coprime\n");
}
