#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long to, cost;
};
const long long INF = 100000000000000000;
const long long INF2 = 9223372036854775807;
const long long MOD = 1000000007;
long long ceil2(long long a, long long b) {
  if (a % b == 0) {
    return a / b;
  } else {
    return a / b + 1;
  }
}
long long pow2(long long a, long long b) {
  long long r = 1;
  for (long long i = 1; i <= b; i++) {
    r *= a;
  }
  return r;
}
long long Log2(long long a) {
  long long t = 0;
  while (1) {
    if (a == 0 || a == 1) {
      break;
    }
    a /= 2;
    t++;
  }
  return t;
}
long long N;
long long A[1000010];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
vector<long long> dec2(long long n) {
  set<long long> u;
  long long a = 2;
  while (n >= a * a) {
    if (n % a == 0) {
      u.insert(a);
      n /= a;
    } else {
      a++;
    }
  }
  vector<long long> v(u.begin(), u.end());
  return v;
}
signed main() {
  cin >> N;
  for (long long i = 0; i < (long long)(N); i++) {
    cin >> A[i];
  }
  long long G = A[0];
  for (long long i = 1; i < N; i++) {
    G = gcd(G, A[i]);
  }
  if (G != 1) {
    cout << "not coprime" << endl;
  } else {
    set<long long> U;
    for (long long i = 0; i < (long long)(N); i++) {
      vector<long long> v = dec2(A[i]);
      for (long long j = 0; j < (long long)(v.size()); j++) {
        if (U.find(v[j]) != U.end()) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          U.insert(v[j]);
        }
      }
    }
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
