#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e6 + 111;
const long long mod = 1e9 + 7;
int a[maxn];
int m = 0, p[maxn];
void divide(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      int cnt = 0;
      while (n % i == 0) n /= i, ++cnt;
      p[i]++;
    }
  }
  if (n > 1) p[n]++;
}
int main() {
  int n;
  scanf("%d", &n);
  int num = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    if (a[i] == 1) ++num;
    divide(a[i]);
  }
  int tot = 0;
  int tot2 = 0;
  int flag = 0;
  for (int i = 1; i <= 1000000; ++i) {
    if (p[i] == 1) ++tot;
    if (p[i] == n) ++tot2;
  }
  if (tot == n - num) {
    puts("pairwise coprime");
  } else if (tot2 == 0) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
  return 0;
}
