#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
const int MAXN = 1e6 + 3;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
const int maxn = 1e6;
long long sieve[maxn];
map<long long, long long> pfq;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (long long i = 1; i <= (n); ++i) cin >> a[i];
  long long gd = 0;
  for (long long i = 2; i < maxn; i++) {
    if (sieve[i] == 0) {
      sieve[i] = i;
      for (long long j = 2; j * i < maxn; j++) {
        sieve[j * i] = i;
      }
    }
  }
  for (long long i = 1; i <= (n); ++i) {
    long long val = a[i];
    gd = gcd(gd, val);
    set<long long> st;
    while (val > 1) {
      if (st.count(sieve[val]) == 0) pfq[sieve[val]]++;
      st.insert(sieve[val]);
      val /= sieve[val];
    }
  }
  int flag = 1;
  for (auto it : pfq) {
    if (it.second > 1) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    cout << "pairwise coprime\n";
    return 0;
  } else {
    if (gd == 1) {
      cout << "setwise coprime\n";
      return 0;
    } else {
      cout << "not coprime\n";
      return 0;
    }
  }
  return 0;
}
