#include <bits/stdc++.h>
using namespace std;
long long n, a[1000005];
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  vector<long long> l;
  l.push_back(1);
  bool flag = 1;
  for (int i = 1; i <= n; i++) {
    int ls = l.size() - 1;
    for (int j = 0; j <= ls; j++) {
      if (gcd(l[j], a[i]) != 1) {
        flag = 0;
        break;
      }
    }
    if (!flag) break;
    l[ls] = lcm(a[i], l[ls]);
    if (l[ls] > 1e11) {
      l.push_back(1);
    }
  }
  if (flag) {
    cout << "pairwise coprime";
    return 0;
  }
  long long g = a[1];
  for (int i = 2; i <= n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
