#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1e+14;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int v;
    cin >> v;
    a.push_back(v);
  }
  vector<long long> prime(1010, 0);
  for (int i = 0; i < n; i++) {
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j != 0) continue;
      while (a[i] % j == 0) {
        a[i] /= j;
      }
      prime[j]++;
    }
    if (a[i] != 1) prime[a[i]]++;
  }
  bool judge1 = true;
  bool judge2 = true;
  for (int i = 0; i < 1010; i++) {
    if (prime[i] > 1) judge1 = false;
    if (prime[i] >= n) judge2 = false;
  }
  if (judge1 && judge2)
    cout << "pairwise coprime" << endl;
  else if (judge2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
