#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void testCase() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  map<long long, long long> mp;
  long long pair = 1;
  for (long long i = 0; i < n; i++) {
    for (long long j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (mp[j] == 1) {
          pair = 0;
          break;
        }
        if (j != 1 && mp[j] == 0) {
          mp[j] = 1;
        }
        if (mp[a[i] / j] == 1) {
          pair = 0;
          break;
        }
        mp[a[i] / j] = 1;
      }
    }
    if (pair == 0) {
      break;
    }
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
  } else {
    long long gd = a[0];
    for (long long i = 0; i < n; i++) {
      gd = gcd(gd, a[i]);
    }
    if (gd == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) testCase();
  return 0;
}
