#include <bits/stdc++.h>
using namespace std;
int a[2000050], n, r[2000050];
int p[200000];
int gcd(int x, int y) {
  if (!y) {
    return x;
  }
  if (x > y) swap(x, y);
  return gcd(x, y % x);
}
void prime() {
  int k = 2;
  bool flag = true;
  p[1] = 2;
  for (int i = 3; i <= 2000010; i++) {
    flag = true;
    for (int j = 2; j * j <= i; j++)
      if (i % j == 0) {
        flag = false;
        break;
      }
    if (flag) {
      p[k] = i;
      k++;
    }
  }
}
bool ipc() {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; p[j] * p[j] <= a[i]; j++)
      if (a[i] % p[j] == 0) {
        if (r[p[j]]) return false;
        r[p[j]]++;
      }
  }
  return true;
}
bool isc() {
  int k = a[1], m;
  for (int i = 2; i <= n; i++) {
    m = gcd(k, a[i]);
    k = m;
    if (k == 1) return true;
  }
  return false;
}
int main() {
  prime();
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (!isc()) {
    cout << "not coprime";
    return 0;
  }
  if (ipc()) {
    cout << "pairwise coprime";
    return 0;
  }
  cout << "setwise coprime";
  return 0;
  return 0;
}
