#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  map<long long, long long> mp;
  for (long long i = 0; i < n; ++i) {
    if (a[i] == 0) mp[a[i]]++;
    for (long long j = 2; j < sqrt(a[i]) + 5; ++j) {
      if (a[i] % j == 0) {
        mp[j]++;
        while (a[i] % j == 0) {
          a[i] /= j;
        }
      }
    }
    if (a[i] != 1) mp[a[i]]++;
  }
  bool pairwise = true, setwise = true;
  for (auto x : mp) {
    if (x.first != 1 && x.second != 1) pairwise = false;
    if (x.first != 1 && x.second == n) setwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime";
  } else if (setwise) {
    cout << "subset coprime";
  } else {
    cout << "not coprime";
  }
}
