#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int mod = (int)(1e9) + 7;
const int inf = 0x7fffffff;
const int N = (int)(2e6) + 7;
int n, a[N], p[N];
int gcd(int x, int y) {
  if (x < y) swap(x, y);
  return y ? gcd(y, x % y) : x;
}
int main() {
  scanf("%d", &n);
  int g = 1;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    g = gcd(a[i], g);
  }
  for (int i = 1; i <= n; ++i) {
    int t = a[i];
    for (int j = 2; 1LL * j * j <= t; ++j) {
      if (t % j) continue;
      ++p[j];
      while (t % j == 0) t /= j;
    }
    if (t > 1) {
      ++p[t];
    }
  }
  int flg = 0;
  for (int i = 2; i <= (int)(1e6); ++i) {
    if (p[i] > 1) {
      flg = 1;
      break;
    }
  }
  if (!flg)
    puts("pairwise coprime");
  else if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
