#include <bits/stdc++.h>
using namespace std;
map<int, int> factorize(int x) {
  map<int, int> ret;
  int d, q;
  while (x >= 4 && x % 2 == 0) {
    ret[2]++;
    x /= 2;
  }
  d = 3;
  q = x / d;
  while (q >= d) {
    if (x % d == 0) {
      ret[d]++;
      x = q;
    } else {
      d += 2;
    }
    q = x / d;
  }
  ret[x]++;
  return ret;
}
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int main() {
  int N;
  cin >> N;
  vector<int> v;
  for (int i = (0); i < (int)(N); i++) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  map<int, int> memo;
  bool flg = false;
  for (int i = N - 1; i >= 0; i--) {
    map<int, int> res = factorize(v[i]);
    for (__typeof((res).begin()) it = (res).begin(); it != (res).end(); ++it) {
      if (memo.count(it->first) > 0) {
        flg = true;
        break;
      }
      memo[it->first]++;
    }
  }
  if (!flg) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int ret = v[0];
  for (int i = (0); i < (int)(N); i++) {
    ret = gcd(ret, v[i]);
  }
  if (ret == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
