#define _CRT_SECURE_NO_WARNINGS
#include<cstdio>
#include<vector>
#include<string>
#include<iostream>
#include<algorithm>
#include<map>
#include<iterator>
#include<set>
#include<stack>
#include<queue>
#include<fstream>
#include<iomanip>
#include <unordered_map>
#include <unordered_set>
#include <numeric>
#include<cmath>
#include<list>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;


#define FOR(i,a,b) for(LL i = (a); i < (b); i++)
#define RFOR(i,b,a) for(int i = (b) - 1; i >= (a); i--)
#define ITER(it,a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); it++)
#define FILL(a, value) memset(a, value, sizeof(a))

#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define PB push_back
#define MP make_pair

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;

const double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000 + 7;
const LL LINF = INF * (LL)INF;

using namespace std;

const LL MOD = 1000000007;



int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int n;
	cin >> n;
	VI arr(n);
	
	FOR(i,0,n) {
	    cin >> arr[i];
	}
	int gcdall = arr[0];
	FOR(i,0,n) {
	    gcdall = __gcd(gcdall, arr[i]);
	}
	
	set<int> divs;
	bool pairwise = true;
	FOR(i,0,n) {
	    int x = arr[i];
	    FOR(j,2,sqrt(x)+1) {
	        if (x % j == 0) {
	            if (divs.find(j) == divs.end()) {
	                divs.insert(j);
	                while (x%j==0) {
	                    x/=j;
	                }
	            } else {
	                pairwise = false;
	                break;
	            }
	        }
	       
	    }
	     if (!pairwise) break;
	}
	if (pairwise) {
	    cout << "pairwise coprime" << endl;
	    return 0;
	}
	if (gcdall == 1) {
	    cout << "setwise coprime" << endl;
	    return 0;
	}
	cout << "not coprime" << endl;
	return 0;
}







