#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < (n); ++i) cin >> a[i];
  vector<int> insu(1000000, 0);
  for (int i = 0; i < (n); ++i) {
    int x = 2;
    int temp = a[i];
    while (a[i] >= x * x) {
      if (temp % x == 0) {
        insu[x]++;
        temp = temp / x;
        while (temp % x == 0) {
          temp = temp / x;
        }
      }
      x++;
    }
    insu[temp]++;
  }
  int pairflag = 1;
  int setflag = 1;
  for (int i = 2; i < 1000000; i++) {
    if (insu[i] != 0) {
      if (insu[i] != 1) {
        pairflag = 0;
      }
      if (insu[i] == n) {
        setflag = 0;
      }
    }
  }
  if (pairflag) {
    cout << "pairwise coprime" << endl;
  } else if (setflag) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
