#include <bits/stdc++.h>
using namespace std;
map<long long, bool> used;
struct UnionFind {
  vector<long long> size, parents;
  UnionFind() {}
  UnionFind(long long n) {
    size.resize(n, 0);
    parents.resize(n, 0);
    for (long long i = 0; i < n; i++) makeTree(i);
  }
  void makeTree(long long x) {
    parents[x] = x;
    size[x] = 1;
  }
  bool isSame(long long x, long long y) { return findRoot(x) == findRoot(y); }
  bool unite(long long x, long long y) {
    x = findRoot(x);
    y = findRoot(y);
    if (x == y) return false;
    if (size[x] > size[y]) {
      parents[y] = x;
      size[x] += size[y];
    } else {
      parents[x] = y;
      size[y] += size[x];
    }
    return true;
  }
  long long findRoot(long long x) {
    if (x != parents[x]) parents[x] = findRoot(parents[x]);
    return parents[x];
  }
  long long treeSize(long long x) {
    used[x] = true;
    return size[findRoot(x)];
  }
};
const int mod = 1e9 + 7;
const double pi = acos(-1);
long long cei(long long x, long long y) {
  long long ans = x / y;
  if (x % y != 0) ans++;
  return ans;
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long llpow(long long x, long long n) {
  long long ans = 1, i;
  for ((i) = (0); (i) < (n); (i)++) {
    ans *= x;
    ans %= mod;
  }
  return ans;
}
long long modpow(long long x, long long n) {
  long long ans = x, i, tmp = x, t1 = 1;
  i = 1;
  while (i < n) {
    if (i * 2 < n) {
      ans *= ans;
      ans %= mod;
      i *= 2;
    } else {
      t1 = 1;
      tmp = x;
      while (t1 * 2 < n - i) {
        tmp *= tmp;
        tmp %= mod;
        t1 *= 2;
      }
      ans *= tmp;
      ans %= mod;
      i += t1;
    }
  }
  return ans;
}
long long fact(long long x) {
  long long i, ans = 1;
  for ((i) = (0); (i) < (x); (i)++) {
    ans *= (x - i);
    ans %= mod;
  }
  return ans;
}
long long inv(long long x) { return modpow(x, mod - 2); }
long long ncr(long long n, long long r) {
  long long a = fact(n), b = modpow(fact(n - r), mod - 2),
            c = modpow(fact(r), mod - 2);
  long long ans = a * b;
  ans %= mod;
  ans *= c;
  ans %= mod;
  return ans;
}
long long npr(long long n, long long r) {
  long long a = fact(n), b = modpow(fact(n - r), mod - 2);
  return (a * b) % mod;
}
bool prime(long long a) {
  if (a <= 1) return false;
  long long i;
  for (i = 2; i * i <= a; i++) {
    if (a % i == 0) return false;
  }
  return true;
}
long long fib(long long x) {
  long long i, fibo[x + 10];
  fibo[0] = 1;
  fibo[1] = 1;
  fibo[2] = 1;
  for ((i) = (3); (i) < (x + 1); (i)++) fibo[i] = fibo[i - 1] + fibo[i - 2];
  return fibo[x];
}
long long dig(long long n) {
  long long d = 0, tmp = n;
  while (tmp / 10 > 0) {
    tmp /= 10;
    d++;
  }
  return d;
}
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
long long i, j;
int main() {
  long long n;
  cin >> n;
  long long a[n + 10], gd;
  for ((i) = (0); (i) < (n); (i)++) cin >> a[i];
  bool used[100000] = {0}, flag = false;
  for ((i) = (0); (i) < (n); (i)++) {
    long long tmp = a[i];
    for (j = 2; j * j <= a[i] && tmp != 1; ++j) {
      if (tmp % j != 0) continue;
      if (used[j] != false) {
        flag = true;
        break;
      }
      used[j] = true;
      while (tmp % j == 0) tmp /= j;
    }
    if (tmp != 1) {
      j = tmp;
      if (used[j] != false) {
        flag = true;
        break;
      }
      used[j] = true;
      while (tmp % j == 0) tmp /= j;
    }
    if (flag) break;
  }
  if (!flag) {
    puts("pairwise coprime");
    return 0;
  }
  for ((i) = (0); (i) < (n); (i)++) {
    if (i == 0)
      gd = a[i];
    else
      gd = gcd(a[i], gd);
    if (gd == 1) {
      puts("setwise coprime");
      return 0;
    }
  }
  puts("not coprime");
  return 0;
}
