#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const long long int MOD = 1e9 + 7, INF = 1e18;
long long int dx[8] = {0, -1, 1, 0, 1, -1, 1, -1},
              dy[8] = {1, 0, 0, -1, -1, -1, 1, 1};
struct edge {
  long long int cost;
  long long int u, v;
};
vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
const long long int MAX_A = 1000000;
long long int N, arr[MAX_A];
int main() {
  cin >> N;
  for (long long int i = (0), i_end_ = (N); i < i_end_; i++) {
    cin >> arr[i];
  }
  auto vec = prime_table(MAX_A + 1);
  bool flag = true;
  for (long long int i = (0), i_end_ = (MAX_A + 1); i < i_end_; i++) {
    long long int cnt = 0;
    if (!vec[i]) continue;
    for (long long int j = (0), j_end_ = (N); j < j_end_; j++) {
      if (arr[j] % i == 0) cnt++;
    }
    if (cnt > 1) {
      flag = false;
      break;
    }
  }
  if (flag) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  long long int _gcd = arr[0];
  for (long long int i = (0), i_end_ = (N - 1); i < i_end_; i++) {
    _gcd = gcd(_gcd, arr[i + 1]);
  }
  if (_gcd == 1) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
}
