#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
const long long mod = 1000000007;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<long long> check(1000000);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  bool pairwise = true;
  for (int i = 2; i < (n); ++i) {
    long long cnt = 0;
    for (int j = 0; j < (n); ++j) {
      if (a[j] % i == 0) cnt++;
      if (cnt >= 2) pairwise = false;
    }
    if (cnt == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
