#include <iostream>
#include <iomanip>
#include <algorithm>
#include <bitset>
#include <string>
#include <cmath>
#include <complex>
#include <numeric>
#include <cassert>

#include <vector>
#include <array>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <utility>

#define PI 3.14159265358979323846
#define int64 long long
#define uint64 unsigned long long
#define coutfix(i) cout << fixed << setprecision(i)		//coutの浮動小数出力の桁数設定
using namespace std;

int main()
{
	int64 nn;
	cin >> nn;
	vector<int64> aa(nn);
	for(int64 ii = 0;ii < nn;ii++)
	{
		cin >> aa[ii];
	}
	map<int64, int64> memo;
	int64 allgcd = aa[0];
	for(int64 ii = 1;ii < nn;ii++)
	{
		allgcd = gcd(allgcd, aa[ii]);
		if(allgcd == 1)
		{
			break;
		}
	}
	if(allgcd != 1)
	{
		cout << "not coprime" << endl;
		return 0;
	}
	for(int64 ii = 0;ii < nn;ii++)
	{
		int64 tmp = aa[ii];
		for(int64 jj = 2;jj <= sqrt(aa[ii]) && tmp != 1;jj++)
		{
			if(aa[ii] % jj == 0)
			{
				if(memo[jj] == 0)
				{
					memo[jj] = 1;
				}
				else
				{
					cout << "setwise coprime" << endl;
					return 0;
				}
			}
		}
		if(tmp != 1)
		{
			if(memo[tmp] == 0)
			{
				memo[tmp] = 1;
			}
			else
			{
				cout << "setwise coprime" << endl;
				return 0;
			}
		}
	}
	cout << "pairwise coprime" << endl;
	return 0;
}