#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int N;
  cin >> N;
  vector<int> isA(1000001, 0), is_prime(1000001, 1);
  for (int n = 0; n < N; ++n) {
    int a;
    cin >> a;
    ++isA[a];
  }
  bool setwise = true, pairwise = true;
  is_prime[0] = is_prime[1] = 0;
  for (int p = 2; p <= 1000000; ++p) {
    if (not is_prime[0]) {
      continue;
    }
    int cnt = 0;
    for (int q = p; q <= 1000000; q += p) {
      is_prime[q] = 0;
      cnt += isA[q];
    }
    if (cnt == N) {
      setwise = false;
    }
    if (cnt >= 2) {
      pairwise = false;
    }
  }
  if (pairwise) {
    cout << "parwise coprime\n";
  } else if (setwise) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
