#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1000000000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long int n, i, cnt;
  cin >> n;
  long int a[n];
  int g = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  long int minn = a[n - 1];
  for (long int j = 2; j * j <= minn; j++) {
    cnt = 0;
    for (i = 0; i < n; i++) {
      if (a[i] % j == 0) cnt++;
    }
    if (cnt == n) {
      g = n;
      break;
    } else if (cnt > 1) {
      g = 2;
    } else {
      g = max(g, 1);
    }
  }
  if (g <= 1)
    cout << "pairwise coprime" << '\n';
  else if (g < n)
    cout << "setwise coprime" << '\n';
  else
    cout << "not coprime" << '\n';
}
