#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
long long INFl = (long long)1e+18 + 1;
int INF = 1e+9 + 1;
int A[1000001];
int insu[1000001] = {};
void prime_factor_decomp(long long n) {
  long long m = n;
  for (long long i = 2; i * i <= n; i++) {
    if (m % i != 0) continue;
    int c = 0;
    while (m % i == 0) c++, m /= i;
    insu[i]++;
  }
  if (m > 1) {
    insu[m]++;
  }
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
int main() {
  int N;
  cin >> N;
  for (int i = 0; i < (int)N; i++) cin >> A[i];
  for (int i = 0; i < (int)N; i++) {
    if (A[i] != 1) {
      prime_factor_decomp(A[i]);
    }
  }
  bool flag = 1;
  for (int i = 1; i <= (int)1000000; i++) {
    if (insu[i] >= 2) {
      flag = 0;
      break;
    }
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
  } else {
    int g = 0;
    for (int i = 0; i < (int)N; i++) g = gcd(g, A[i]);
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
