#include <bits/stdc++.h>
using namespace std;
#define read(n) cin>>n;
#define write(n) cout<<n;
#define loop(x,n) for(int x = 0; x < n; ++x)
#define vector_loop(x,n) for(int i = 0; x < n; i++)
#define vii vector<int> a(n)
typedef pair<int, int> pii;
#define endl "\n"
#define sd(val) scanf("%d", &val)
#define ss(val) scanf("%s", &val)
#define sl(val) scanf("%lld", &val)
#define debug(val) printf("check%d\n", val)
#define all(v) v.begin(), v.end()
#define MP make_pair
#define FF first
#define SS second
#define ll long long
#define MOD 1000000007
#define clr(val) memset(val, 0, sizeof(val))
#define what_is(x) cerr << #x << " is " << x << endl;
#define OJ                            \
    freopen("input.txt", "r", stdin); \
    freopen("output.txt", "w", stdout);
#define FIO                           \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);

int findGCD(int arr[], int n)
{
	int result = arr[0];
	for (int i = 1; i < n; i++)
	{
		result = __gcd(arr[i], result);

		if (result == 1)
		{
			return 1;
		}
	}
	return result;
}
bool check(int a[], int n) {
	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			if (i != j)
			{
				if (__gcd(a[i], a[j]) != 1)
					return false;
			}
		}
	}
	return true;
}


int main()
{
	
	FIO;
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	bool ans = check(a, n);
	if (ans == true)
		cout << "pairwise coprime";
	else
	{
		if (findGCD(a, n) == 1)
			cout << "setwise coprime";
		else
			cout << "not coprime";
	}





	return 0;
}