#include <bits/stdc++.h>
using namespace std;
int a[1000005];
bool p[1000005];
int main(void) {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 2; i <= 1000000; i++) p[i] = true;
  for (int i = 2; i <= 1000000; i++) {
    if (p[i]) {
      for (int j = 2 * i; j <= 1000000; j += i) p[j] = false;
    }
  }
  vector<int> pr;
  for (int i = 2; i <= 1000000; i++)
    if (p[i]) pr.push_back(i);
  bool ok = false;
  for (int p : pr) {
    bool tmp = true;
    for (int i = 0; i < n; i++) {
      if (a[i] % p != 0) {
        tmp = false;
        break;
      }
    }
    if (tmp) {
      ok = true;
      break;
    }
  }
  if (ok) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int p : pr) {
    int cnt = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % p == 0) {
        cnt++;
      }
    }
    if (cnt > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
