#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}, dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int upint(const void *a, const void *b) {
  return *(int *)a < *(int *)b ? -1 : *(int *)a > *(int *)b ? 1 : 0;
}
int downint(const void *a, const void *b) {
  return *(int *)a < *(int *)b ? 1 : *(int *)a > *(int *)b ? -1 : 0;
}
int upchar(const void *left, const void *right) {
  return strcmp((char *)left, (char *)right);
}
int downchar(const void *left, const void *right) {
  return strcmp((char *)right, (char *)left);
}
long long modpow(long long a, long long n, long long mod) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) {
      res *= a;
      if (mod >= 1) res %= mod;
    }
    a *= a;
    if (mod >= 1) a %= mod;
    n >>= 1;
  }
  return res;
}
void initialize() {}
int main(void) {
  initialize();
  long long n, m, i, j, k, result = 0;
  int a[1000010] = {0};
  int check[1000010] = {0};
  map<long long, long long> dp;
  int prime[1000010] = {0};
  string s;
  cin >> n;
  k = 0;
  for ((i) = 0; (i) < (n); (i)++) {
    cin >> a[i];
    dp[a[i]]++;
    k = ((k) > (a[i]) ? (k) : (a[i]));
  }
  prime[2] = 1;
  for (i = 3; i <= k; i += 2) {
    prime[i] = 1;
  }
  for (i = 3; i * i <= k; i += 2) {
    for (j = 3 * i; j <= k; j += 2 * i) {
      prime[j] = 0;
    }
  }
  int flag = 0;
  for (long long key = 2; key <= k; key++) {
    if (prime[key] == 0) continue;
    for (j = key; j <= k; j += key) {
      if (dp[j] >= 1) {
        if (check[j] == 1) {
          flag = 1;
          break;
        } else {
          check[j] = 1;
        }
      }
    }
    if (flag == 1) break;
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long tmp2 = a[0];
  for (i = 1; i < n; i++) {
    tmp2 = gcd(tmp2, a[i]);
  }
  if (tmp2 == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
