#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[1000010], ans[1000010];
int gcd(int x, int y) {
  if (y == 0)
    return x;
  else
    return gcd(y, x % y);
}
int f[1000010];
int main() {
  cin >> n;
  int sumgcd = 0;
  for (int i = 1; i <= n; i++) cin >> a[i], sumgcd = gcd(sumgcd, a[i]);
  bool flg = 1;
  for (int i = 1; i <= n; i++) {
    int x = a[i];
    for (int ii = 2; ii * ii <= x && x > 1; ii++) {
      if (x % ii == 0) {
        if (f[ii]) {
          flg = 0;
          break;
        }
        f[ii] = 1;
        while (x % ii == 0) x /= ii;
      }
    }
    if (x) {
      if (f[x]) {
        flg = 0;
        break;
      }
      f[x] = 1;
    }
    if (flg == 0) break;
  }
  if (flg == 1) {
    puts("pairwise coprime");
  } else {
    if (sumgcd == 1)
      puts("setwise coprime");
    else
      puts("not coprime");
  }
  return 0;
}
