#include <bits/stdc++.h>
using namespace std;
int spf[1000001];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000001; i++) spf[i] = i;
  for (int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
int main() {
  sieve();
  int f[1000001];
  memset(f, 0, sizeof(f));
  int n;
  cin >> n;
  int m = n;
  while (m--) {
    int x;
    cin >> x;
    map<int, bool> check;
    while (x != 1) {
      if (!check[spf[x]]) {
        f[spf[x]]++;
        check[spf[x]] = 1;
      }
      x = x / spf[x];
    }
  }
  bool f1 = 1, f2 = 1;
  for (int i = 0; i < 10; i++) {
    if (f[i] > 1) f1 = 0;
    if (f[i] >= n) f2 = 0;
  }
  if (!f1 && f2)
    cout << "setwise coprime";
  else if (f1)
    cout << "pairwise coprime";
  else
    cout << "not coprime";
}
