#include <bits/stdc++.h>
using ll = long long int;
using P = std::pair<int, int>;
constexpr int MAX = 1e6 + 10;
int pb[MAX];
int gcd(int a, int b) {
  if (a < b) std::swap(a, b);
  return (b == 0) ? a : gcd(b, a % b);
}
int main() {
  int n;
  std::cin >> n;
  int g = -1;
  for (int i = 0; i < (n); ++i) {
    int a;
    std::cin >> a;
    if (g < 0)
      g = a;
    else
      g = gcd(g, a);
    int x = 2;
    while (a >= x * x) {
      if (a % x == 0) {
        while (a % x == 0) a /= x;
        ++pb[x];
      }
      ++x;
    }
  }
  for (int i = 1; i < MAX; ++i) {
    if (pb[i] > 1) {
      if (g == 1)
        std::cout << "setwise coprime" << std::endl;
      else {
        std::cout << "not coprime" << std::endl;
      }
      return 0;
    }
  }
  std::cout << "pairwise coprime" << std::endl;
  return 0;
}
