#include <bits/stdc++.h>
using namespace std;
typedef priority_queue<long long, vector<long long>, greater<long long>> spqll;
typedef priority_queue<long long, vector<long long>, less<long long>> bpqll;
long long MOD = 1000000007;
long long INF = 1e18;
long double EPS = 1e-9;
long double PI = M_PI;
vector<long long> dx = {1, 0, -1, 0, 1, -1, -1, 1};
vector<long long> dy = {0, 1, 0, -1, 1, 1, -1, -1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
void p() {
  cout << "pairwise coprime"
       << "\n";
}
void s() {
  cout << "setwise coprime"
       << "\n";
}
void no() {
  cout << "not coprime"
       << "\n";
}
vector<long long> prime_table(long long n) {
  vector<bool> flag(n + 1, true);
  vector<long long> res(n + 1, 0);
  flag[0] = flag[1] = false;
  res[0] = 0;
  res[1] = 1;
  for (long long i = 2; i * i <= n; i++) {
    if (flag[i]) {
      res[i] = i;
      for (long long j = i + i; j <= n; j += i) {
        flag[j] = false;
        res[j] = i;
      }
    }
  }
  return res;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  long long tmp = gcd(a[0], a[1]);
  for (long long i = 2; i < n; i++) {
    tmp = gcd(tmp, a[i]);
  }
  if (tmp != 1) {
    no();
    return 0;
  }
  vector<long long> pt = prime_table(1000000);
  vector<bool> cnt(1000000 + 1, false);
  for (long long i = 0; i < n; i++) {
    long long x = a[i];
    while (x > 1) {
      long long k = pt[x];
      if (cnt[k]) {
        s();
        return 0;
      }
      cnt[k] = true;
      while (x % k == 0) x /= k;
    }
  }
  p();
  return 0;
}
