#include <bits/stdc++.h>
using namespace std;
int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
int foo(int n, int r) {
  if (n == r) return 1;
  if (r == 1) return n;
  return foo(n - 1, r) + foo(n - 1, r - 1);
}
int main() {
  int n, y;
  cin >> n;
  y = foo(n, 2);
  int a[n], x = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0) {
      x++;
    }
  }
  if (x == n) {
    cout << "not coprime" << endl;
  } else {
    int p = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        if (gcd(a[i], a[i - 1]) == 1) {
          p++;
        }
      }
    }
    if (p == y) {
      cout << "pairwise coprime" << endl;
    } else
      cout << "setwise coprime" << endl;
  }
}
