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