#include <bits/stdc++.h>
long long mod = 1e9 + 7;
class Mint {
 public:
  long long x;
  Mint(){};
  Mint(long long a) {
    x = a % mod;
    while (x < 0) {
      x += mod;
    }
  };
  Mint &operator+=(const Mint &a) {
    x += a.x;
    x %= mod;
    return *this;
  }
  Mint &operator-=(const Mint &a) {
    x += (mod - a.x);
    x %= mod;
    return *this;
  }
  Mint &operator*=(const Mint &a) {
    x *= a.x;
    x %= mod;
    return *this;
  }
  Mint pow(long long n) const {
    if (n == 0) return Mint(1);
    Mint y = pow(n >> 1);
    y *= y;
    if (n % 2 == 1) y *= *this;
    return y;
  }
  Mint modinv(const Mint &a) const { return a.pow(mod - 2); }
  Mint &operator/=(const Mint &a) {
    x *= modinv(a).x;
    x %= mod;
    return *this;
  }
  Mint operator+(Mint &a) const {
    Mint y(*this);
    y += a;
    return y;
  }
  Mint operator-(Mint &a) const {
    Mint y(*this);
    y -= a;
    return y;
  }
  Mint operator*(Mint &a) const {
    Mint y(*this);
    y *= a;
    return y;
  }
  Mint operator/(Mint &a) const {
    Mint y(*this);
    y /= a;
    return y.x;
  }
  Mint nCk(Mint &n, const long long k) const {
    Mint y = Mint(1);
    Mint one = Mint(1);
    for (Mint i(0); (i.x) < k; i.x++) {
      y *= (n - i);
      y /= (i + one);
    }
    return y;
  }
  Mint nPk(Mint &n, long long k) const {
    Mint y(1);
    for (Mint i(0); (i.x) < k; i.x++) {
      y *= (n - i);
    }
    return y;
  }
};
int parent[200004];
int length[200004];
int num[200004];
void init() {
  for (int i = 0; i < 200004; i++) {
    parent[i] = i;
    length[i] = 1;
    num[i] = 1;
  }
  return;
}
int getroot(int n) {
  int orig = n;
  while (n != parent[n]) {
    n = parent[n];
  }
  parent[orig] = n;
  return n;
}
bool samegroup(int n, int m) {
  n = getroot(n);
  m = getroot(m);
  return n == m;
}
void unite(int n, int m) {
  n = getroot(n);
  m = getroot(m);
  if (samegroup(n, m)) return;
  if (length[n] > length[m]) {
    parent[m] = n;
    num[n] += num[m];
  } else if (length[m] > length[n]) {
    parent[n] = m;
    num[m] += num[n];
  } else {
    parent[n] = m;
    length[n]++;
    num[m] += num[n];
  }
}
int getgcd(int a, int b) {
  int max = std::max(a, b);
  int min = std::min(a, b);
  if (min == 0) return max;
  return getgcd(min, max % min);
}
int main() {
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  for (int i = 0; i < N; i++) {
    std::cin >> A[i];
  }
  int gcd = A[0];
  for (int i = 1; i < N; i++) {
    gcd = getgcd(gcd, A[i]);
  }
  std::vector<int> prime;
  std::vector<bool> use(1001001, false);
  for (int i = 2; i * i <= 1000000; i++) {
    if (!use[i]) {
      prime.push_back(i);
      for (int j = i * 2; j * j <= 1000000; j += i) {
        use[j] = true;
      }
    }
  }
  bool ng = false;
  for (int p : prime) {
    bool find = false;
    for (int j = 0; j < N; j++) {
      if (find && A[j] % p == 0) {
        ng = true;
        break;
      }
      while (A[j] % p == 0) {
        A[j] /= p;
        find = true;
      }
    }
  }
  std::vector<int> amari;
  for (int i = 0; i < N; i++) {
    if (A[i] != 1) amari.push_back(A[i]);
  }
  std::sort(amari.begin(), amari.end());
  for (int i = 0; i < amari.size() - 1; i++) {
    if (amari[i] == amari[i + 1]) {
      ng = true;
      break;
    }
  }
  if (!ng) {
    printf("pairwise coprime\n");
  } else if (gcd == 1) {
    printf("setwise coprime\n");
  } else {
    printf("not coprime\n");
  }
  return 0;
}
