#include <bits/stdc++.h>
using namespace std;
long long n, x, num[1000005], pp = 1, s, p[100005];
bool nprim[1000005];
int main() {
  cin >> n;
  nprim[0] = nprim[1] = 1;
  for (long long i = 2; i * i <= 1e6; ++i)
    for (long long j = i * i; j <= 1e6; j += i) nprim[j] = 1;
  for (int i = 2; i <= 1e6; ++i)
    if (!nprim[i]) p[++s] = i;
  for (long long i = 0; i < n; ++i) {
    scanf("%d", &x);
    for (long long j = 1; p[j] <= x; ++j)
      if (x % p[j] == 0) {
        ++num[p[j]];
        if (num[p[j]] > 1) pp = 0;
        if (num[p[j]] == n) {
          cout << "not coprime";
          return 0;
        }
      }
  }
  if (pp)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
  return 0;
}
