#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 1e6 + 10;
using namespace std;
int a[maxn];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int solve() {
  int n, all = 0, b, flag = 1;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> b, a[b]++, all = gcd(all, b);
  for (int i = 2, sum = 0; i < maxn; ++i) {
    for (int j = i; j < maxn; j += i) sum += a[j];
    if (sum > 1) flag = 0;
  }
  return cout << (flag       ? "pairwise coprime"
                  : all == 1 ? "setwise coprime"
                             : "not coprime"),
         0;
}
signed main() {
  int _ = 1;
  while (_--) {
    solve();
  }
  return 0;
}
