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

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl





using ll = long long;

const ll mod = 1e9+7;
const int maxn = 1e6 + 5;



int n;
int a[maxn];
bool hit[maxn];

void proc(int x) {

    for (int i=2; i*i<=x; i++) {
	if (x%i==0) {
	    if (hit[i]) {
		out("set coprime");
	    }
	    while (x%i==0) {
		x /= i;
	    }
	    hit[i]=true;
	}
    }


    if (x>1) {
	if (hit[x]) {
	    out("set coprime");
	}
	hit[x] = true;
    }
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
    cin>>n;
    int g = 0;
    for (int i=0; i<n; i++) {
	cin>>a[i];
	g = __gcd(g, a[i]);
    }

    if (g > 1) out("not coprime");

    for (int i=0; i<n; i++) {
	proc(a[i]);
    }


    cout<<"pairwise coprime\n";
    
    return 0;
}
