#include <bits/stdc++.h>
using namespace std;
const int mn = 1e6 + 7;
int p[mn], n;
bool np[mn], vis[mn];
void get_prime() {
  for (int i = 2; i < mn; ++i) {
    if (!np[i]) p[++p[0]] = i;
    for (int j = 1; j <= p[0] && i * p[j] < mn; ++j) {
      np[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  get_prime();
  scanf("%d", &n);
  int a, g = 0, mx = 0;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a);
    mx = max(mx, a);
    g = gcd(a, g);
    vis[a] = 1;
  }
  int flag = 1;
  for (int i = 1; i <= p[0]; ++i) {
    int t = mx / p[i], cnt = 0;
    for (int j = 1; j <= t; ++j) {
      if (vis[p[i] * j]) cnt++;
    }
    if (cnt > 1) flag = 0;
  }
  if (flag) {
    puts("pairwise coprime");
    return 0;
  }
  if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
