#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
const int INF = 2147483647;
const long long LINF = 9223372036854775807;
const int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1};
bool p[1000005];
int n, a[1000005], cnt[100005];
vector<int> v;
bool ok1 = 1, ok2 = 1;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  for (int i = 2; i <= 1000000; i++) {
    if (!p[i]) {
      v.push_back(i);
      for (int j = i * 2; j <= 1000000; j += i) p[j] = 1;
    }
  }
  cin >> n;
  for (int(i) = 0; i < (n); i++) {
    cin >> a[i];
    int k = 0;
    while (a[i] != 1) {
      if (a[i] % v[k] == 0) cnt[k]++;
      while (a[i] % v[k] == 0) a[i] /= v[k];
      k++;
    }
  }
  for (int(i) = 0; i < (v.size()); i++) {
    if (cnt[i] > 1) ok1 = 0;
    if (cnt[i] == n) ok2 = 0;
  }
  if (ok1)
    cout << "pairwise coprime";
  else if (ok2)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
