#include <bits/stdc++.h>
using namespace std;
const int N = 2000010;
int a[N], st[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    int t = a[i];
    for (int j = 2; j * j <= t; ++j) {
      if (t % j == 0) {
        ++st[t];
        ++st[j];
        while (t % j == 0) t /= j;
      }
    }
  }
  bool F = true, S = true;
  for (int i = 2; i <= N; ++i) {
    if (st[i] > 1) F = false;
    if (st[i] >= n) S = false;
  }
  if (F)
    puts("pairwise coprime");
  else if (S)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
