#include <bits/stdc++.h>
using namespace std;
int ans;
int gcd_(int aa, int bb) {
  int a = aa;
  int b = bb;
  int r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  ans = a;
  return b;
}
int solve() {
  int N;
  cin >> N;
  int flag = 0;
  int flag2 = 0;
  for (int i = 1; i <= N; i++) {
    if (i == 1) {
      cin >> ans;
      continue;
    }
    int x;
    cin >> x;
    int g = gcd_(ans, x);
    if (g != 1) {
      flag = 1;
    } else {
      flag2 = 1;
    }
  }
  if (flag == 0)
    cout << "pairwise coprime";
  else if (flag2 == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
int main() {
  int _ = 1;
  while (_--) {
    solve();
  }
  return 0;
}
