#include <bits/stdc++.h>
using namespace std;
int64_t gcdExtended(int64_t a, int64_t b, int64_t *x, int64_t *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  int64_t x1, y1;
  int64_t gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
int64_t modInverse(int64_t b, int64_t m) {
  int64_t x, y;
  int64_t g = gcdExtended(b, m, &x, &y);
  if (g != 1) return -1;
  return (x % m + m) % m;
}
int64_t modDivide(int64_t a, int64_t b, int64_t m) {
  a = a % m;
  int64_t inv = modInverse(b, m);
  return (inv * a) % m;
}
int64_t gcd(int64_t a, int64_t b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a - b, b);
  return gcd(a, b - a);
}
int64_t lcm(int64_t a, int64_t b) {
  int64_t x = (a * b);
  int64_t y = gcd(a, b);
  return modDivide((int64_t)x, (int64_t)y, (int64_t)1000000007);
}
bool pairwiseCoprime(vector<int64_t> A) {
  if (A.size() == 1) return true;
  int64_t current = (lcm(A[0], A[1]));
  int64_t pro = (A[0] * A[1]) % 1000000007;
  for (int64_t i = 2; i < A.size(); ++i) {
    current = lcm(current, A[i]);
    pro = (pro * A[i]) % 1000000007;
  }
  if (pro == current) return true;
  return false;
}
bool setwiseCoprime(vector<int64_t> A) {
  int64_t current = gcd(A[0], A[1]);
  for (int64_t i = 2; i < A.size(); ++i) current = gcd(current, A[i]);
  return current == 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int testCases = 1;
  while (testCases--) {
    int64_t N;
    cin >> N;
    vector<int64_t> A(N);
    for (int i = 0; i < N; ++i) cin >> A[i];
    if (pairwiseCoprime(A)) {
      cout << "pairwise coprime" << endl;
    } else if (setwiseCoprime(A)) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
