#include <bits/stdc++.h>
const int N = 1e3;
int cnt[N + 1];
bool flg[N + 1];
std::vector<int> prime;
inline void eular() {
  memset(flg, true, sizeof flg);
  for (int i = 2; i <= N; ++i) {
    if (flg[i]) {
      prime.push_back(i);
    }
    for (std::vector<int>::iterator it = prime.begin();
         it != prime.end() && i * (*it) <= N; ++it) {
      flg[i * (*it)] = false;
      if (i % *it == 0) {
        break;
      }
    }
  }
}
inline void divide(int x) {
  for (std::vector<int>::iterator it = prime.begin();
       it != prime.end() && *it * (*it) <= x; ++it) {
    if (x % *it == 0) {
      cnt[*it]++;
      while (x % *it == 0) {
        x /= *it;
      }
    }
  }
  if (x != 1) {
    cnt[x]++;
  }
}
inline int gcd(int a, int b) {
  if (!b) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  eular();
  int n;
  std::cin >> n;
  int a, g;
  std::cin >> g;
  divide(g);
  for (int i = 1; i < n; ++i) {
    std::cin >> a;
    divide(a);
    g = gcd(a, g);
  }
  if (g != 1) {
    std::cout << "not coprime" << std::endl;
  } else {
    bool flg = true;
    for (std::vector<int>::iterator it = prime.begin(); it != prime.end();
         ++it) {
      if (cnt[*it] == 1) {
        flg = false;
        break;
      }
    }
    if (flg) {
      std::cout << "setwise coprime" << std::endl;
    } else {
      std::cout << "pairwise coprime" << std::endl;
    }
  }
  return 0;
}
