/**
 *    author:  Mohamad Milhem
**/

#include <bits/stdc++.h>
#include <stdio.h>

using namespace std;
typedef long long ll;

#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define mp make_pair
#define pb push_back
#define lp(i,s,f) for(ll i = s; i < ll(f); i++)
#define inF freopen("input.in", "r", stdin);
#define outF freopen("output.in", "w", stdout);
#define MOD ll(1000000007)
#define debug(x) cout << '[' << #x << " is: " << x << "] " <<endl;
#define decimalpoint cout << std::fixed << setprecision(5)
int here[1000005];
int maxx;


void fact(int v){

	for (int i = 2 ; i <= sqrt(v); i++){
		if (i > v)break;
		if (v % i == 0){
			here[i]++;
			maxx = max(maxx , here[i]);
			while(v%i == 0){
				v/=i;
			}
		}
	}

	here[v]++;
	maxx = max(maxx , here[i]);


}




void solve(){
	int n;
	cin >> n;
	vector<int> v(n);

	lp(i , 0 , n){
		cin >> v[i];
	}

	lp(i , 0 , n){
		fact(v[i]);
	}


	if (maxx == n){
		cout << "not coprime" << endl;
	}
	else if (maxx == 1){
		cout << "pairwise coprime" << endl;
	}
	else {
		cout << "setwise coprime" << endl;
	}

}



int main()
{
    FAST;
    int t;
    t = 1;

    while(t--){
        solve();
    }
    return 0;
}
