#include <bits/stdc++.h>
using namespace std;
bool isprime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i += 6) {
    if (n % i == 0 || n % (i + 2) == 0) return false;
  }
  return true;
}
long long modexp(long long a, long long b, long long m) {
  long long r = 1;
  a = a % m;
  while (b > 0) {
    if (b & 1) r = (r * a) % m;
    b = b >> 1;
    a = (a * a) % m;
  }
  return r % m;
}
struct CustomCompare {
  bool operator()(const int& lhs, const int& rhs) { return lhs < rhs; }
};
long long builtin_popcount(long long x) {
  long long cnt = 0;
  for (long long i = 60; i >= 0; i--) {
    if ((1LL << i) & x) cnt++;
  }
  return cnt;
}
long long addmod(long long a, long long b, long long r) {
  a %= r;
  b %= r;
  return (a + b) % r;
}
long long mulmod(long long a, long long b, long long r) {
  a %= r;
  b %= r;
  return (a * b) % r;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long n;
vector<long long> arr;
bool check_coprime() {
  long long ans = arr[n - 1];
  bool flag = true;
  for (long long i = n - 2; i >= 0; i--) {
    if (gcd(ans, arr[i]) != 1) {
      flag = false;
      break;
    }
    long long res = gcd(ans, arr[i]);
    ans = ans * arr[i];
    ans /= res;
  }
  return flag;
}
bool check_set() {
  long long ans = arr[0];
  for (int i = 1; i < n; i++) ans = gcd(ans, arr[i]);
  return ans == 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  arr = vector<long long>(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  if (check_coprime())
    cout << "pairwise coprime\n";
  else if (check_set())
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
