#include <bits/stdc++.h>
using namespace std;
int a[1000005];
int n;
int np[1005], ha[1000005];
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int now = a[1];
  for (int i = 2; i <= n; i++) now = gcd(now, a[i]);
  if (now != 1) {
    puts("not coprime");
    return 0;
  }
  for (int i = 2; i <= 1000; i++) {
    if (np[i]) continue;
    for (int j = i * 2; j <= 1000; j += i) np[j] = 1;
    bool flag = 0;
    int cnt = 0;
    for (int j = 1; j <= n; j++) {
      while (a[j] % i == 0) a[j] /= i, flag = 1;
      cnt += flag;
    }
    if (cnt > 1) {
      puts("setwise coprime");
      return 0;
    }
  }
  for (int i = 1; i <= n; i++) ha[a[i]]++;
  for (int i = 2; i <= 1000000; i++)
    if (ha[i] > 1) {
      puts("setwise coprime");
      return 0;
    }
  puts("pairwise coprime");
  return 0;
}
