#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using llu = long long unsigned int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vii = vector<pii>;
using vll = vector<pll>;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  int t;
  while (b) {
    t = b;
    b = a % b;
    a = t;
  }
  return a;
}
int main() {
  int N;
  scanf("%d", &N);
  vi a(N);
  for (ll i = 0; i < N; i++) scanf("%d", &a[i]);
  int ans = 2;
  char* anss[3] = {"not", "setwise", "pairwise"};
  vi ex(1e6 + 1);
  vi te;
  for (ll i = 0; i < N; i++) {
    int ta = a[i];
    te.clear();
    for (int d = 2; d * d <= a[i]; d++) {
      while (ta % d == 0) {
        te.push_back(d);
        ta /= d;
      }
    }
    if (ta != 1) te.push_back(ta);
    for (int d : te) {
      if (ex[d]) ans = 1;
    }
    for (int d : te) {
      ex[d] = 1;
    }
  }
  int gg = 0;
  for (ll i = 0; i < N; i++) {
    gg = gcd(gg, a[i]);
  }
  if (gg != 1) ans = 0;
  printf("%s coprime\n", anss[ans]);
  return 0;
}
