#include <iostream>
#include <string>//
#include <vector>//
#include <map>
#include <cstdlib>
#include <numeric>
#include <algorithm>//ソート等に使用
#include <iomanip>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <thread>///////////////////
#include <queue>//幅優先等のキュー
#include <stack>
#include <bitset>

#define rep(i,m,n) for(int i=(m);i<=(n);i++)
#define mer(i,m,n) for(int i=(m);i>=(n);--i)

#define MOD 1000000007
//#define MOD 998244353
//#define MAX 

using namespace std;

using ll = long long int;
using ld = long double;
using std::swap;

vector<int> v;
vector<long long int> vll;
//vector<vector<int>> vec(50, vector<int>(4, 0));
vector<vector<int>> vv;
vector<char> vc;
vector<string> vs;




int main() {
	int N;
	cin >> N;
	v.resize(N);
	int pc = 1;
	int gsc;
	rep(i, 0, N - 1) {
		cin >> v[i];
		if (i > 0)rep(j, 0, i - 1) {
			int gpc = gcd(v[j], v[i]);
			if (i == 1)gsc = gpc;
			else gsc = gcd(gsc, gpc);

			if (gpc != 1)pc = 0;
		}
	}
	if (pc == 1) {
		cout << "pairwise coprime" << '\n';
		return 0;
	}
	if (gsc == 1) {
		cout << "setwise coprime" << '\n';
		return 0;
	}
	else {
		cout << "not coprime" << '\n';
		return 0;
	}
	
}