#include <bits/stdc++.h>
using namespace std;
int get_int() {
  int x;
  scanf("%d", &x);
  return x;
}
long long get_ll() {
  long long x;
  scanf("%lld", &x);
  return x;
}
double get_db() {
  double x;
  scanf("%lf", &x);
  return x;
}
template <typename T>
int chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  } else
    return 0;
}
template <typename T>
int chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  } else
    return 0;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (int i = (0); i < (v.size()); i++) os << v[i] << " ";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  for (auto a : v) os << a << " ";
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const pair<T1, T2>& v) {
  os << v.first << " " << v.second << " ";
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, const map<T1, T2>& v) {
  for (auto a : v) cout << a << endl;
  return os;
}
static const int dx[8] = {-1, 0, 1, 0, 1, -1, 1, -1};
static const int dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
const double pi = acos(-1.0);
const double eps = 1e-8;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int inf = 0x3f3f3f3f;
const int maxn = 1e6 + 5;
const int max_prime = 1005;
int is_pair = 1;
int is_set = 1;
int A[maxn];
int prime[max_prime];
int N;
map<int, int> mp;
void get_prime() {
  for (int i = (2); i < (max_prime); i++) {
    prime[i] = 1;
  }
  for (int i = (2); i < (max_prime); i++) {
    if (prime[i]) {
      for (int j = i + i; j < max_prime; j += i) {
        prime[j] = 0;
      }
    }
  }
}
void factor(int n) {
  int i, temp = sqrt(n + 1);
  for (i = 2; i <= temp; i++) {
    if (prime[i]) {
      int c = 0;
      for (int j = (0); j < (N); j++) {
        if (A[j] % i == 0) {
          c++;
          while (A[j] % i != 0) A[j] /= i;
        }
      }
      if (c >= 2) {
        is_pair = 0;
      }
      if (c == N) {
        is_set = 0;
      }
    }
    if (!is_pair && !is_set) return;
  }
  for (int i = (0); i < (N); i++) {
    if (A[i] != 1) {
      mp[A[i]]++;
    }
  }
  for (auto a : mp) {
    if (a.second >= 2) is_pair = 0;
    if (a.second == N) is_set = 0;
  }
}
int main() {
  cin >> N;
  for (int i = (0); i < (N); i++) {
    cin >> A[i];
  }
  get_prime();
  factor(maxn);
  if (is_pair) {
    cout << "pairwise coprime" << endl;
  } else if (is_set) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
