#include <bits/stdc++.h>
using namespace std;
class UnionFind {
 public:
  vector<int> Parent;
  UnionFind(int N) { Parent = vector<int>(N, -1); }
  int root(int A) {
    if (Parent[A] < 0) return A;
    return Parent[A] = root(Parent[A]);
  }
  int size(int A) { return -Parent[root(A)]; }
  bool connect(int A, int B) {
    A = root(A);
    B = root(B);
    if (A == B) {
      return false;
    }
    if (size(A) < size(B)) swap(A, B);
    Parent[A] += Parent[B];
    Parent[B] = A;
    return true;
  }
};
template <typename T>
struct SegTree {
  using F = function<T(T, T)>;
  vector<T> seg;
  int siz;
  const T unit;
  const F f;
  SegTree(int n, const T unit, const F f) : unit(unit), f(f) {
    siz = 1;
    while (siz < n) siz <<= 1;
    seg.assign(siz * 2 - 1, unit);
    siz--;
  }
  void set(int k, const T& t) { seg[k + siz] = t; }
  void build() {
    for (int i = siz - 1; 0 <= i; i--) {
      seg[i] = f(seg[i * 2 + 1], seg[i * 2 + 2]);
    }
  }
  T operator[](const int i) { return seg[i + siz]; }
  void update(int k, T x) {
    k += siz;
    seg[k] = x;
    while (0 < k) {
      k = (k - 1) >> 1;
      seg[k] = f(seg[k * 2 + 1], seg[k * 2 + 2]);
    }
  }
  T query(int a, int b) {
    T l = unit, r = unit;
    for (a += siz, b += siz; a < b; a >>= 1, b >>= 1) {
      if (!(a & 1)) l = f(l, seg[a++]);
      if (!(b & 1)) r = f(seg[--b], r);
    }
    return f(l, r);
  }
};
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
long long extGCD(long long a, long long b, long long& x, long long& y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long d = extGCD(b, a % b, y, x);
  y -= a / b * x;
  return d;
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
long long int nCr(long long int n, long long int r, long long int m) {
  long long int ans = 1;
  for (long long int i = 0; i < r; i++) {
    ans *= n - i;
    ans %= m;
  }
  for (long long int i = 1; i <= r; i++) {
    ans *= modinv(i, m);
    ans %= m;
  }
  return ans;
}
long long int power(long long int a, long long int b, long long int m) {
  if (b == 1) return a;
  if (b == 0) return 1;
  long long int tmp = power(a, (long long int)b / 2, m);
  tmp *= tmp;
  tmp %= m;
  if (b % 2 == 1) {
    tmp *= a;
    tmp %= m;
  }
  return tmp;
}
bool next_combination(long long int& sub, int length) {
  long long int x = sub & -sub, y = sub + x;
  sub = (((sub & ~y) / x) >> 1) | y;
  return sub < (long long int)(1 << (long long int)length);
}
void Zalgorithm(string& s, vector<int>& a) {
  a[0] = s.size();
  int i = 1, j = 0;
  while (i < s.size()) {
    while (i + j < s.size() && s[j] == s[i + j]) j++;
    a[i] = j;
    if (j == 0) {
      i++;
      continue;
    }
    int k = 1;
    while (i + k < s.size() && a[k] + k < j) {
      a[i + k] += a[k];
      k++;
    }
    i += k;
    j -= k;
  }
  return;
}
int main() {
  vector<int> p(1, 2);
  for (int i = 3; i < 1000; i += 2) {
    bool tmp = true;
    for (int j : p) {
      if (i % j == 0) {
        tmp = false;
        break;
      }
    }
    if (tmp) p.push_back(i);
  }
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  for (int i = 0; i < n - 1; i++) g = GCD(g, a[i + 1]);
  if (g == 1) {
    int cnt = 0;
    for (int i = 0; i < p.size(); i++) {
      int tmp = 0;
      for (int j = 0; j < n; j++) {
        if (a[j] % p[i] == 0) tmp++;
      }
      cnt = max(cnt, tmp);
      if (cnt > 1) break;
    }
    if (cnt > 1) {
      cout << "setwise coprime" << endl;
    } else
      cout << "pairwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
