#include <bits/stdc++.h>
inline bool IsNum(char x) { return ('0' <= x) && (x <= '9'); }
inline long long ReadNum() {
  long long sign = 1, val = 0;
  char tmp = getchar();
  while (!IsNum(tmp)) {
    if (tmp == '-') {
      sign = -sign;
    }
    tmp = getchar();
  }
  while (IsNum(tmp)) {
    val = val * 10 + tmp - 48;
    tmp = getchar();
  }
  return val * sign;
}
int n, a[2000010], maxnum;
bool pairwise = true, setwise = true, keg[2000010];
inline int gcd(int _x, int _y) {
  if (_x < _y) std::swap(_x, _y);
  int _z = 0;
  while (_y) _z = _x % _y, _x = _y, _y = _z;
  return _x;
}
inline void Process() {
  bool mark = false;
  for (int base = 2; base * base <= maxnum; base++) {
    mark = false;
    for (int times = 1; times * base <= maxnum; times++) {
      if (keg[base * times]) {
        if (mark)
          pairwise = false;
        else
          mark = true;
      }
    }
  }
  int ggcd = a[1];
  for (int i = 2; i <= n; i++) ggcd = gcd(ggcd, a[i]);
  if (ggcd != 1) setwise = false;
}
inline void ReadIn() {
  n = ReadNum();
  for (int i = 1; i <= n; i++)
    a[i] = ReadNum(), keg[a[i]] = true, maxnum = std::max(maxnum, a[i]);
}
inline void PrintAns() {
  if (pairwise)
    puts("pairwise coprime");
  else if (setwise)
    puts("setwise coprime");
  else
    puts("not coprime");
}
int main() {
  ReadIn();
  Process();
  PrintAns();
  return 0;
}
