#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int NINF = 0xc0c0c0c0;
const int INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
const long long N = 1e6 + 5;
int n, even, a[N], cnt[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) even++;
    for (int j = 1; 1ll * j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cnt[j]++;
        if (j > 1 and cnt[j] >= n) return cout << "not coprime\n", 0;
        if (1ll * j * j != a[i]) {
          cnt[a[i] / j]++;
          if (a[i] / j > 1 and cnt[a[i] / j] >= n)
            return cout << "not coprime\n", 0;
        }
      }
    }
  }
  for (int i = 2; i <= 1e6; i++) {
    if (cnt[i] > 1 and cnt[i] < n) return cout << "setwise coprime\n", 0;
    if (cnt[i] >= n) return cout << "not coprime\n", 0;
  }
  cout << "pairwise coprime\n";
  return 0;
}
