#include <bits/stdc++.h>
using namespace std;
int n, a[1000100], yin[1000100];
int flag1 = 0;
int read() {
  int s = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f |= (ch == '-'), ch = getchar();
  while (isdigit(ch)) s = s * 10 + (ch ^ 48), ch = getchar();
  return f ? -s : s;
}
int gcd(int a, int b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  n = read();
  for (int i = 1, x; i <= n; i++) {
    x = read();
    a[i] = x;
    for (int i = 2; i * i <= x; i++) {
      if (x % i == 0) {
        if (yin[i]) flag1 = 1;
        while (x % i == 0) {
          x /= i;
          yin[i]++;
        }
      }
    }
    if (x != 1) yin[x]++;
  }
  if (!flag1)
    puts("pairwise coprime");
  else {
    int x = 0;
    for (int i = 1; i <= n; i++) x = gcd(x, a[i]);
    if (x == 1)
      puts("setwise coprime");
    else
      puts("not coprime");
  }
  return 0;
}
