#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double Pi = 3.141592653589793;
const long long MOD = 1e9 + 7;
const long long FMOD = 998244353;
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    res *= a * (long long)(b & 1LL);
    a *= a;
    b /= 2;
  }
  return res;
}
template <class T, class S>
int search(T a, S el, int n = 0) {
  n = n ? n : a.size();
  int i = 0;
  for (int b = n / 2; b > 0; b /= 2)
    while (i + b < n && a[i] <= el) i += b;
  return i;
}
template <class T>
bool umin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool umax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int egcd(int a, int b, int &x, int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  int x1, y1;
  int d = egcd(b, a % b, x1, y1);
  x = y1;
  y = x1 - y1 * (a / b);
  return d;
}
template <class A>
void read(vector<A> &v);
template <class A, size_t S>
void read(array<A, S> &a);
template <class T>
void read(T &x) {
  cin >> x;
}
void read(double &d) {
  string t;
  read(t);
  d = stod(t);
}
void read(float &d) {
  string t;
  read(t);
  d = stod(t);
}
void read(long double &d) {
  string t;
  read(t);
  d = stold(t);
}
template <class H, class... T>
void read(H &h, T &...t) {
  read(h);
  read(t...);
}
template <class A>
void read(vector<A> &x) {
  for (auto &a : x) read(a);
}
template <class A, size_t S>
void read(array<A, S> &x) {
  for (auto &a : x) read(a);
}
string to_string(char c) { return string(1, c); }
string to_string(bool b) { return b ? "true" : "false"; }
string to_string(const char *s) { return string(s); }
string to_string(string s) { return s; }
string to_string(vector<bool> v) {
  string res;
  for (int i = (0); (1) > 0 ? i < ((int)(v).size()) : i > ((int)(v).size());
       i += (1))
    res += char('0' + v[i]);
  return res;
}
template <size_t S>
string to_string(bitset<S> b) {
  string res;
  for (int i = (0); (1) > 0 ? i < (S) : i > (S); i += (1))
    res += char('0' + b[i]);
  return res;
}
template <class T>
string to_string(T v) {
  bool f = 1;
  string res;
  for (auto &x : v) {
    if (!f) res += ' ';
    f = 0;
    res += to_string(x);
  }
  return res;
}
template <class A>
void write(A x) {
  cout << to_string(x);
}
template <class H, class... T>
void write(const H &h, const T &...t) {
  write(h);
  write(t...);
}
void print() { write("\n"); }
template <class H, class... T>
void print(const H &h, const T &...t) {
  write(h);
  if (sizeof...(t)) write(' ');
  print(t...);
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << to_string(h);
  if (sizeof...(t)) cerr << ", ";
  DBG(t...);
}
const int INF = 1e9;
const long long mxN = 1e9;
void solve() {
  int n;
  read(n);
  vector<int> a(n);
  read(a);
  unordered_map<int, int> d;
  vector<int> p;
  vector<bool> ok(1005, 1);
  for (int i = (2); (1) > 0 ? i < (1005) : i > (1005); i += (1)) {
    if (ok[i]) {
      p.push_back(i);
      for (int j = (i * i); (i) > 0 ? j < (1005) : j > (1005); j += (i))
        ok[j] = 0;
    }
  }
  for (auto &x : a) {
    for (auto &i : p) {
      d[i] += x % i == 0;
    }
  }
  bool pc = 1, sc = 1;
  for (auto &x : d) {
    pc &= x.second < 2;
    sc &= x.second < n;
  }
  print(pc ? "pairwise coprime" : sc ? "setwise coprime" : "not coprime");
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  for (int i = (0); (1) > 0 ? i < (t) : i > (t); i += (1)) {
    solve();
  }
}
