#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
char tolower(char c) { return (c + 0x20); }
char toupr(char c) { return (c - 0x20); }
const int MAX_A = 1000100;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  int res[MAX_A];
  for (long long i = 0; i < MAX_A; i++) res[i] = 0;
  for (long long j = 0; j < n; j++) {
    int ori_n = a[j];
    for (int i = 2; i * i <= ori_n; i++) {
      long long cnt = 0;
      while (a[j] % i == 0) {
        cnt++;
        a[j] /= i;
      }
      if (cnt >= 1) ++res[i];
    }
    if (a[j] * a[j] > ori_n) res[a[j]]++;
  }
  bool ispair = true;
  bool isset = true;
  bool isnot = true;
  for (long long i = 0; i < MAX_A; i++) {
    if (res[i] == n) isset = false;
    if (res[i] > 1) ispair = false;
  }
  if (ispair)
    cout << "pairwise coprime" << endl;
  else if (isset)
    cout << "setwise coprime " << endl;
  else
    cout << "not coprime" << endl;
}
