#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
vector<int> T;
void makeTable() {
  vector<int> prime(1e6 + 1, 1);
  prime[2] = prime[3] = 1;
  for (int i = 2; i <= 1e6; i++) {
    if (prime[i]) T.push_back(i);
    for (int j = 0; j < T.size() && i * T[j] <= 1e6; j++) {
      prime[i * T[j]] = 0;
      if (i % T[j] == 0) break;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n), vis(1e6 + 1, 0);
  for (int i = 0; i < n; i++) cin >> a[i], vis[a[i]]++;
  makeTable();
  bool flag = true;
  for (auto x : T) {
    int cnt = 0;
    for (int i = x; i < 1e6; i += x) cnt += vis[i];
    if (cnt > 1) flag = false;
    if (cnt == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
