#include <bits/stdc++.h>
using namespace std;
long long a[1000001];
bool isprime(long long x) {
  long long sum = 0;
  for (long long i = 1; i * i <= x; i++)
    if (x % i == 0) sum++;
  return sum == 1;
}
bool coprime(long long x, long long y) {
  long long c = abs(x - y);
  if (c > 1 && x % c == 0) return 0;
  if (x % 2 && c == 2) return 1;
  if (x == y) return 0;
  if (c == 1) return 1;
  if (isprime(x) && isprime(y)) return 1;
  for (long long i = 2; i <= c; i++)
    if (x % i == 0 && y % i == 0) return 0;
  return 1;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long Gcd;
  bool setco = 0, pairco = 1;
  for (long long i = 0; i < (n); i++) {
    cin >> a[i];
    Gcd = (i ? gcd(a[i], Gcd) : a[i]);
    if (pairco) {
      for (long long j = 0; j < (i); j++)
        if (!coprime(a[i], a[j]))
          pairco = 0;
        else
          setco = 1;
    }
  }
  if (pairco)
    cout << "pairwise coprime\n";
  else if (setco || Gcd == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
