#include <bits/stdc++.h>
using namespace std;
bool p[1000006];
long long r[1000005], y, o, k[1000006], b, u, a, ans;
int gp() {
  for (int i = 2; i <= 1000000; i++) {
    if (p[i] == 0) {
      for (int j = i * 2; j <= 1000000; j += i) p[j] = 1;
    }
  }
  for (int i = 2; i <= 1000000; i++) {
    if (p[i] == 0) {
      r[y] = i;
      y++;
    }
  }
  return 0;
}
int main() {
  gp();
  cin >> a;
  for (int i = 0; i < a; i++) {
    u = 1;
    cin >> b;
    for (int j = 0; r[j] <= sqrt(b) && u == 1; j++) {
      u = 0;
      if (b % r[j] == 0) {
        while (b % r[j] == 0) b /= r[j];
        k[r[j]]++;
        u = 1;
      }
    }
    k[b]++;
  }
  o = 1;
  for (int i = 0; i <= 1000000; i++) {
    if (k[i] >= 2) ans = max(ans, k[i]);
  }
  if (ans <= 1)
    cout << "pairwise coprime" << endl;
  else if (ans < a)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
