#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 0x3f3f3f3f;
const long long nax = 0;
long long n;
vector<long long> cnt(1000005, 0);
bool setwise = 0;
void solve(long long x) {
  long long batas = sqrt(x);
  for (int i = 1; i <= batas; ++i) {
    if (x % i == 0) {
      if (x / i == i) {
        cnt[i]++;
        if (cnt[i] == n && i != 1) {
          cout << "not coprime" << '\n';
          exit(0);
        }
        if (cnt[i] > 1 && i != 1) setwise = 1;
      } else {
        cnt[i]++;
        cnt[x / i]++;
        if (cnt[i] == n && i != 1) {
          cout << "not coprime" << '\n';
          exit(0);
        }
        if (cnt[i] > 1 && i != 1) setwise = 1;
        if (cnt[x / i] == n && x / i != 1) {
          cout << "not coprime" << '\n';
          exit(0);
        }
        if (cnt[x / i] > 1 && x / i != 1) setwise = 1;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> n;
  vector<long long> arr(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; ++i) {
    solve(arr[i]);
  }
  if (setwise)
    cout << "setwise coprime" << '\n';
  else
    cout << "pairwise coprime" << '\n';
}
