#include <bits/stdc++.h>
using namespace std;
long long gcd(long long, long long);
long long a[1000000];
long long fullgcd(long long, long long);
long long fullgcd(long long arr[], long long n) {
  long long gcd, i, j;
  gcd = arr[0];
  j = 1;
  while (j < n) {
    if (arr[j] % gcd == 0) {
      j++;
    } else {
      gcd = arr[j] % gcd;
      i++;
    }
  }
  return gcd;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, pc = 0;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) == 1) pc++;
    }
  }
  if (pc > 0)
    cout << "pairwise coprime"
         << "\n";
  else if (fullgcd(a, n) == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
long long gcd(long long a, long long b) {
  if (!a || !b) return a | b;
  unsigned shift = __builtin_ctz(a | b);
  a >>= __builtin_ctz(a);
  do {
    b >>= __builtin_ctz(b);
    if (a > b) swap(a, b);
    b -= a;
  } while (b);
  return a << shift;
}
