#include <bits/stdc++.h>
using namespace std;
const long long INF = 100100100100100100;
const long long MOD = 1000000007;
long long my_abs(long long a);
long long a_n(long long a, long long n);
long long my_gcd(long long a, long long b);
long long inv(long long a);
long long madd(long long a, long long b, long long c);
long long msub(long long a, long long b);
long long mtime(long long a, long long b, long long c);
int main() {
  long long n, ans = 0;
  cin >> n;
  vector<bool> exist(1000005, false);
  for (long long(i) = 0; (i) < (long long)(n); (i)++) {
    long long a;
    cin >> a;
    if (exist[a] && a != 1) {
      cout << "not coprime" << endl;
      return 0;
    } else {
      exist[a] = true;
    }
  }
  for (long long i = 2; i <= 1000000; i++) {
    long long num = 0;
    for (long long j = i; j <= 1000000; j += i) {
      if (exist[j]) num++;
    }
    if (num == n) {
      cout << "not coprime" << endl;
      return 0;
    } else if (ans < num)
      ans = num;
  }
  if (ans <= 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
long long my_abs(long long a) {
  if (a >= 0)
    return a;
  else
    return -1 * a;
}
long long a_n(long long a, long long n) {
  if (n == 0) return 1;
  long long ret = a, count = 1;
  while (count * 2 < n) {
    ret *= ret;
    count *= 2;
  }
  if (count == n)
    return ret;
  else
    return (ret * a_n(a, n - count));
}
long long my_gcd(long long a, long long b) {
  if (b == 0) return a;
  return my_gcd(b, a % b);
}
long long inv(long long a) { return a_n(a, MOD - 2); }
long long madd(long long a, long long b, long long c) {
  long long ret = (a + b) % MOD;
  return (ret + c) % MOD;
}
long long msub(long long a, long long b) {
  if (a < b)
    return (a - b + MOD) % MOD;
  else
    return (a - b) % MOD;
}
long long mtime(long long a, long long b, long long c) {
  long long ret = (a * b) % MOD;
  return (ret * c) % MOD;
}
