#include <bits/stdc++.h>
using namespace std;
inline long long ii() {
  long long x;
  cin >> x;
  return x;
}
inline string is() {
  string x;
  cin >> x;
  return x;
}
inline long double id() {
  long double x;
  cin >> x;
  return x;
}
inline void oi(long long x) { cout << x; }
inline void od(long double x) { cout << fixed << setprecision(10) << x; }
inline void os(string x) { cout << x; }
inline void oe() { cout << endl; }
inline void oie(long long x) {
  oi(x);
  oe();
}
inline void ode(long double x) {
  od(x);
  oe();
}
inline void ose(string x) {
  os(x);
  oe();
}
inline void maxin(long long &a, long long b) { a = max(a, b); }
inline void minin(long long &a, long long b) { a = min(a, b); }
bool pt[1123456];
void e(vector<long long> &ps) {
  for (long long i = 0; i < (1123456); i++) pt[i] = true;
  pt[0] = pt[1] = false;
  for (long long i = 0; i < (1123456); i++) {
    if (pt[i]) {
      for (int j = i + i; j < 1123456; j += i) {
        pt[j] = false;
      }
    }
  }
  for (long long i = 0; i < (1123456); i++) {
    if (pt[i]) {
      ps.push_back(i);
    }
  }
}
int main() {
  long long N = ii();
  map<long long, long long> m;
  vector<long long> ps;
  e(ps);
  for (long long t = 0; t < (N); t++) {
    long long a = ii();
    for (long long i = 0; ps[i] <= a; i++) {
      if (a % ps[i] == 0) {
        m[ps[i]]++;
      }
    }
  }
  for (auto v : m) {
    long long n = v.second;
    if (n == N) {
      ose("not coprime");
      return 0;
    }
    if (n > 1) {
      ose("setwise coprime");
      return 0;
    }
  }
  ose("pairwise coprime");
  return 0;
}
