#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int lcm(int a, int b) { return (a * b) / gcd(a, b); }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  bool paiwise = true, setwise = false;
  long long int alcm = lcm(a[0], a[1]);
  long long int prod = a[0] * a[1];
  if (alcm != prod)
    paiwise = false;
  else {
    for (int i = 2; i < n; i++) {
      alcm = lcm(alcm, a[i]);
      prod = prod * a[i];
      if (alcm != prod) {
        paiwise = false;
        break;
      }
      alcm = alcm % 1000000007;
      prod = prod % 1000000007;
    }
  }
  int answer = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    answer = gcd(answer, a[i]);
    if (answer == 1) {
      setwise = true;
      break;
    }
  }
  if (paiwise) {
    cout << "pairwise coprime" << endl;
  } else {
    if (setwise)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
