#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long powmod(long long x, long long n) {
  long long ret = 1;
  while (n > 0) {
    if (n & 1) ret = ret * x % 1000000007;
    x = x * x % 1000000007;
    n >>= 1;
  }
  return ret;
}
long long ctoi(char c) {
  switch (c) {
    case '0':
      return 0;
    case '1':
      return 1;
    case '2':
      return 2;
    case '3':
      return 3;
    case '4':
      return 4;
    case '5':
      return 5;
    case '6':
      return 6;
    case '7':
      return 7;
    case '8':
      return 8;
    case '9':
      return 9;
    default:
      return 0;
  }
}
long long gcd(long long a, long long b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
bool isPrime(long long x) {
  long long i;
  if (x < 2)
    return 0;
  else if (x == 2)
    return 1;
  if (x % 2 == 0) return 0;
  for (i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> ret;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
long long nCr(long long n, long long r) {
  long long x = 1, y = 1;
  for (long long i = 0; i < r; i++) {
    x = x * (n - i) % 1000000007;
    y = y * (i + 1) % 1000000007;
  }
  return x * powmod(y, 1000000007 - 2) % 1000000007;
}
long long dhh[4] = {1, 0, -1, 0};
long long dww[4] = {0, 1, 0, -1};
struct UnionFind {
  vector<long long> data;
  UnionFind(long long size) : data(size, -1) {}
  bool unionSet(long long x, long long y) {
    x = root(x);
    y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y];
      data[y] = x;
    }
    return x != y;
  }
  bool findSet(long long x, long long y) { return root(x) == root(y); }
  long long root(long long x) {
    return data[x] < 0 ? x : data[x] = root(data[x]);
  }
  long long size(long long x) { return -data[root(x)]; }
};
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long N;
  cin >> N;
  vector<long long> v(N);
  for (long long i = 0; i < long long(N); i++) {
    long long a;
    cin >> a;
    v[i] = a;
  }
  sort(v.begin(), v.end());
  map<long long, long long> pf = prime_factor(v[0]);
  bool isPC = true;
  bool isSC = true;
  for (auto p : pf) {
    long long cnt = 0;
    long long fac = p.first;
    for (long long i = 0; i < long long(v.size()); i++) {
      if (v[i] % fac == 0) cnt++;
    }
    if (cnt != 1) {
      isPC = false;
    }
    if (cnt == N) {
      isSC = false;
    }
  }
  if (isPC) {
    cout << "pairwise coprime" << endl;
  } else if (isSC) {
    cout << "setwise coprime" << endl;
  } else
    cout << "not coprime" << endl;
  return 0;
}
