#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int w = 1, c = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') w = -1;
  for (; isdigit(ch); ch = getchar()) c = (c << 1) + (c << 3) + (ch ^ 48);
  return w * c;
}
const int M = 2e6 + 10;
int a[M], n, b[M];
int gcd(int x, int y) { return (y ? gcd(y, x % y) : x); }
int main() {
  n = read();
  int d = 0;
  for (int i = (1); i <= (n); ++i) {
    a[i] = read();
    b[a[i]]++;
    d = gcd(d, a[i]);
  }
  for (int i = (2); i <= (n); ++i) {
    int tmp = 0;
    for (int j = i; j <= M / 2; j += i) {
      tmp += b[j];
    }
    if (tmp > 1) {
      if (d == 1)
        puts("setwise coprime");
      else
        puts("not coprime");
      return 0;
    }
  }
  puts("pairwise coprime");
  return 0;
}
