#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  long long r;
  while (y > 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}
std::vector<long long> sieve(int n) {
  std::vector<long long> res(n);
  std::iota(res.begin(), res.end(), 0);
  for (long long i = 2; i * i < n; ++i) {
    if (res[i] < i) continue;
    for (long long j = i * i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}
int main() {
  string P = "pairwise coprime";
  string S = "setwise coprime";
  string N = "not coprime";
  bool flag1 = false;
  bool flag2 = false;
  long long n;
  cin >> n;
  vector<long long> A(n);
  for (long long i = 0; i < n; i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  vector<long long> B = A;
  for (long long i = 1; i < n; i++) {
    B[i] = gcd(B[i], B[i - 1]);
    if (B[i] == 1) {
      flag1 = true;
      break;
    }
  }
  if (!flag1) {
    cout << N << endl;
  } else {
    flag2 = true;
    set<long long> C;
    bool flag = true;
    for (long long i = 0; i < n; i++) {
      long long M = A[i];
      for (long long i = 1; i * i < M; i++) {
        if (M % i == 0) {
          if (C.count(i)) {
            flag = false;
            break;
          }
          C.insert(i);
        }
        if (i * i != M) {
          if (C.count(M / i)) {
            flag = false;
            break;
          }
          C.insert(M / i);
        }
      }
      if (flag == false) {
        flag2 = false;
        break;
      }
    }
    if (flag2) {
      cout << P << endl;
    } else {
      cout << S << endl;
    }
  }
}
