#include <bits/stdc++.h>
using namespace std;
int M = 1000001;
int main() {
  int N;
  cin >> N;
  int A[N];
  for (long long(i) = (0); (i) < (N); (i++)) cin >> A[i];
  vector<int> P;
  bool a[M];
  a[0] = a[1] = false;
  for (long long(i) = (2); (i) < (M); (i++)) a[i] = true;
  for (int i = 2, i2 = 4; i2 < M; i++) {
    if (a[i]) {
      int j = i * 2;
      while (j < M) {
        a[j] = false;
        j += i;
      }
    }
    i2 += i * 2 + 1;
  }
  for (long long(i) = (0); (i) < (M); (i++))
    if (a[i]) P.push_back(i);
  int m = P.size();
  bool pairwise = true, setwise = true;
  for (long long(i) = (0); (i) < (m); (i++)) {
    bool all = true, any = false;
    for (long long(j) = (0); (j) < (N); (j++)) {
      if (A[j] % P[i] == 0) {
        if (any) pairwise = false;
        any = true;
      } else {
        all = false;
      }
    }
    if (all) {
      setwise = false;
      break;
    }
  }
  if (pairwise)
    cout << "pairwise coprime";
  else if (setwise)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
