#include <bits/stdc++.h>
using namespace std;
bool f[1000007];
int main() {
  long long n, m = 0;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    long long x;
    cin >> x;
    f[x] = 1;
    m = max(m, x);
  }
  bool a1 = 1, a2 = 1;
  for (long long i = 2; i <= m; i++) {
    long long c = 0;
    for (long long j = i; j <= m; j += i) {
      if (f[j]) c++;
    }
    if (c > 1) a1 = 0;
    if (c == n) a2 = 0;
  }
  if (a1) {
    cout << "pairwise coprime";
    exit(0);
  }
  if (a2) {
    cout << "setwise coprime";
    exit(0);
  }
  cout << "not coprime";
}
