#include <bits/stdc++.h>
using namespace std;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (a % b == 0) {
    return b;
  }
  return gcd(b, a % b);
}
unsigned long long lcm(unsigned long long a, unsigned long long b) {
  unsigned long long g = gcd(a, b);
  unsigned long long l = (a * b) / g;
  return l;
}
int main() {
  int n;
  cin >> n;
  unsigned long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  unsigned long long g = arr[0];
  for (int i = 1; i < n; i++) {
    g = gcd(max(g, arr[i]), min(g, arr[i]));
  }
  if (g != 1) {
    cout << "not coprime" << endl;
  } else {
    unsigned long long ans = 1;
    unsigned long long t = 1;
    bool c = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        if (gcd(max(arr[i], arr[j]), min(arr[i], arr[j])) != 1) {
          cout << "setwise coprime" << endl;
          return 0;
        }
      }
    }
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
