#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n, 0);
  int min = 10000000, mx1, mx2;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (min > a[i]) {
      min = a[i];
    }
    if (mx1 < a[i]) {
      mx1 = a[i];
      mx2 = mx1;
    } else if (mx2 < a[i]) {
      mx2 = a[i];
    }
  }
  int max_divisor = mx2;
  bool isPairwise = true, isSetwise = true;
  for (int d = 2; d <= max_divisor; d++) {
    int zerocnt = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % d == 0) {
        zerocnt++;
      }
    }
    if (zerocnt >= 2) {
      isPairwise = false;
      max_divisor = min;
    }
    if (zerocnt == n) {
      isSetwise = false;
      break;
    }
    zerocnt = 0;
  }
  if (isPairwise) {
    cout << "pairwise coprime\n";
    return 0;
  } else if (isSetwise) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime\n";
  return 0;
}
