#include <bits/stdc++.h>
using namespace std;
int c[1000005];
int s[1000005];
long long int gcd(long long int x, long long int y) {
  long long int tmp;
  long long int r;
  if (x > y) {
    tmp = x;
    x = y;
    y = tmp;
  }
  r = y % x;
  while (r != 0) {
    y = x;
    x = r;
    r = y % x;
  }
  return x;
}
vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  auto t = prime_table(a[n - 1]);
  vector<int> prime;
  for (int i = 1; i <= a[n - 1]; i++)
    if (t[i] == true) prime.push_back(i);
  int flag = 0;
  for (int i = 0; i < n; i++) {
    for (auto u : prime) {
      if (u > a[i])
        break;
      else if (a[i] % u == 0)
        c[u]++;
      if (c[u] > 1) {
        flag++;
        break;
      }
    }
    if (flag > 0) break;
  }
  if (flag == 0) {
    cout << "pairwise coprime";
    return 0;
  }
  s[1] = gcd(a[0], a[1]);
  for (int i = 1; i < n - 1; i++) s[i + 1] = gcd(s[i], a[i + 1]);
  if (s[n - 1] > 1) {
    cout << "not coprime";
    return 0;
  } else {
    cout << "setwise coprime";
    return 0;
  }
}
