#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long int b[1001];
  memset(b, 0, sizeof(b));
  for (long long int i = 0; i < n; ++i) {
    long long int x;
    x = sqrt(a[i]);
    for (long long int j = 2; j <= x; ++j) {
      if (a[i] % j == 0) {
        b[j]++;
      }
    }
  }
  long long int x = 0;
  for (long long int i = 2; i < 1001; ++i) {
    if (b[i] > 1) {
      x++;
      break;
    }
  }
  if (x == 0) {
    cout << "pairwise coprime";
    return 0;
  }
  long long int g = a[0];
  for (long long int i = 1; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
