#include <bits/stdc++.h>
using namespace std;
using Pii = pair<int, int>;
using Pll = pair<long long, long long>;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
char alpha[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                  'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                  's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, 1, -1};
template <typename T>
vector<T> smallest_prime_factors(T n) {
  vector<T> spf(n + 1);
  for (int i = 0; i <= n; i++) spf[i] = i;
  for (T i = 2; i * i <= n; i++) {
    if (spf[i] == i) {
      for (T j = i * i; j <= n; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
  return spf;
}
int main() {
  int n;
  cin >> n;
  vector<long long> lis(n);
  for (int i = (0), i_len = (n); i < i_len; ++i) {
    scanf("%lld", &lis[i]);
  }
  long long setwise = lis[0];
  for (int i = (1), i_len = (n); i < i_len; ++i) {
    setwise = gcd(setwise, lis[i]);
  }
  int f = 1;
  auto spf = smallest_prime_factors(2 * 1e6);
  map<long long, int> mp;
  for (int i = (0), i_len = (n); i < i_len; ++i) {
    mp[spf[lis[i]]]++;
    if (mp[spf[lis[i]]] != 1) {
      f = 0;
    }
  }
  if (f == 1) {
    cout << "pairwise coprime" << endl;
  } else if (setwise == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
