#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x;
}
const int maxn = 1e6 + 10;
int n, a[maxn], cnt[maxn];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        ++cnt[j];
        while (a[i] % j == 0) {
          a[i] /= j;
        }
      }
    }
  }
  bool flag1 = true, flag2 = true;
  for (int i = 1; i <= 1e3 + 10; i++) {
    if (cnt[i] > 1) {
      flag1 = false;
    }
    if (cnt[i] == n) {
      flag2 = false;
    }
  }
  if (flag1) {
    cout << "pairwise coprime" << endl;
  } else if (flag2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
