#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (x == 0) return y;
  return gcd(y % x, x);
}
long long powmod(long long x, long long y, long long m) {
  if (y == 0) return 1;
  long long p = powmod(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
long long mul_inv(long long a, long long b) {
  long long b0 = b, t, q;
  long long x0 = 0ll, x1 = 1ll;
  if (b == 1ll) return 1ll;
  while (a > 1ll) {
    q = a / b;
    t = b, b = a % b, a = t;
    t = x0, x0 = x1 - q * x0, x1 = t;
  }
  if (x1 < 0ll) x1 += b0;
  return x1;
}
bool fa(vector<long long> &x, vector<long long> &y) { return x[0] < y[0]; }
bool fa1(vector<long long> &x, vector<long long> &y) { return x[1] < y[1]; }
bool f1(pair<long long, long long> &x, pair<long long, long long> &y) {
  return x.second > y.second;
}
bool f2(pair<long long, long long> &x, pair<long long, long long> &y) {
  return x.first > y.first;
}
bool f3(long long &x, long long &y) { return x > y; }
const long long maxn = 1e6 + 2;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<vector<long long> > gr(maxn);
  vector<long long> p(maxn, 0ll);
  vector<long long> cnt(maxn, 0ll);
  for (long long i = 2; i < maxn; i++) {
    if (p[i] != 0) continue;
    for (long long t = i + i; t < maxn; t += i) {
      gr[t].push_back(i);
      p[t] = 1;
    }
  }
  long long c[2];
  c[0] = 0;
  c[1] = 0;
  long long b[n];
  for (int i = 0; i < n; i++) cin >> b[i];
  long long x = b[0];
  for (int i = 0; i < n; i++) {
    x = gcd(x, b[i]);
  }
  c[1] = (x == 1);
  long long ch = 0;
  if (c[1] == 1) {
    for (int i = 0; i < n; i++) {
      if (ch) break;
      for (auto x : gr[b[i]]) {
        cnt[x]++;
        if (cnt[x] == 2) {
          ch++;
          break;
        }
      }
    }
    if (ch == 0) {
      c[0] = 1;
    }
  }
  if (c[0] == 1) {
    cout << "pairwise coprime";
  } else if (c[1] == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
