#include <bits/stdc++.h>
using namespace std;
inline void normal(long long &a) {
  a %= 1000000007;
  (a < 0) && (a += 1000000007);
}
inline long long modMul(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a * b) % 1000000007;
}
inline long long modAdd(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  return (a + b) % 1000000007;
}
inline long long modSub(long long a, long long b) {
  a %= 1000000007, b %= 1000000007;
  normal(a), normal(b);
  a -= b;
  normal(a);
  return a;
}
inline long long modPow(long long b, long long p) {
  long long r = 1;
  while (p) {
    if (p & 1) r = modMul(r, b);
    b = modMul(b, b);
    p >>= 1;
  }
  return r;
}
inline long long modInverse(long long a) { return modPow(a, 1000000007 - 2); }
inline long long modDiv(long long a, long long b) {
  return modMul(a, modInverse(b));
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  map<long long, long long> c;
  set<long long> b;
  bool d = true, e = true;
  ;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
    long long m = a[i];
    if (m == 1) b.insert(m);
    for (int j = 2; j * j <= m; ++j) {
      if (m % j == 0) {
        b.insert(j);
        c[j]++;
        while (m % j == 0) m /= j;
      }
    }
    if (m > 1) {
      b.insert(m);
      c[m]++;
    }
  }
  for (auto x : b) {
    if (c[x] > 1) d = false;
  }
  if (d) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long GCD = a[0];
  for (int i = 0; i < (int)(n); i++) {
    GCD = gcd(GCD, a[i]);
  }
  if (GCD == 1) {
    cout << "setwise coprime" << endl;
  } else
    cout << "not coprime" << endl;
}
