#include <bits/stdc++.h>
using namespace std;
int gcd(int n, int m) {
  if (n % m == 0) return m;
  return gcd(m, n % m);
}
vector<int> enum_prime(int n) {
  vector<int> res;
  if (n <= 1) return res;
  vector<bool> p(n + 1);
  fill(p.begin() + 2, p.end(), true);
  for (int i = 2; i <= n; i++) {
    if (p[i]) {
      res.push_back(i);
      for (int j = i * 2; j <= n; j += i) p[j] = false;
    }
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  int a[1000006];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> prime = enum_prime(1000);
  int g = 0;
  for (int i = 0; i < n; i++) g = gcd(g, a[i]);
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (n > 100000) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  bool b[1000004]{0};
  for (int i = 0; i < n; i++) {
    for (int p : prime) {
      if (a[i] % p == 0) {
        if (b[p]) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        while (a[i] % p == 0) a[i] /= p;
        b[p] = true;
      }
    }
    if (a[i] != 1 && b[a[i]]) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    b[a[i]] = true;
  }
  cout << "pairwise coprime" << endl;
}
