#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int gcd(int a, int b) {
  int x = max(a, b);
  int y = min(a, b);
  int r = x % y;
  while (r != 0) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int max_a = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] > max_a) max_a = a[i];
  }
  max_a += 5;
  vector<int> d(max_a, 0);
  for (int i = 2; i < max_a; i++) {
    if (d[i] == 0) {
      for (int j = i; j < max_a; j += i) {
        if (d[j] == 0) d[j] = i;
      }
    }
  }
  vector<int> cnt(max_a, 0);
  for (int ai : a) {
    for (int i = 2; i < max_a; i++) {
      if (ai % d[i] == 0) cnt[i]++;
    }
  }
  bool pairwise = true;
  for (int i : cnt) {
    if (i >= 2) {
      pairwise = false;
      break;
    }
  }
  if (pairwise) {
    printf("pairwise coprime");
    return 0;
  }
  int g = a[0];
  for (int i = 0; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    printf("setwise coprime");
    return 0;
  }
  printf("not coprime");
  return 0;
}
