#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a <= b) {
    swap(a, b);
  }
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int arr[1000000];
void Eratosthenes() {
  for (int i = 0; i < 1e6; i++) {
    arr[i] = 1;
  }
  for (int i = 2; i * i < 1e6; i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < 1e6; j++) {
        arr[i * (j + 2)] = 0;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  bool evenall = 1;
  bool oddall = 1;
  int even = 0;
  vector<int> odd;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 1) {
      evenall = 0;
      odd.push_back(a[i]);
    } else {
      oddall = 0;
      even++;
    }
  }
  if (evenall) {
    cout << "not coprime" << endl;
    return 0;
  }
  int gc = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    gc = gcd(gc, a[i]);
  }
  if (gc != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  if (even >= 2) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  vector<pair<int, int> > p;
  Eratosthenes();
  for (int i = 2; i < 1e6; i++) {
    if (arr[i]) {
      p.push_back(make_pair(i, 0));
    }
  }
  for (int i = 0; i < odd.size(); i++) {
    int now = odd[i];
    for (int i = 0; i < p.size() && now != 1; i++) {
      if (now % p[i].first == 0) {
        now /= p[i].first;
        p[i].second++;
        if (p[i].second >= 2) {
          cout << "set coprime" << endl;
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
