#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
string char_to_str(char c) {
  string tem(1, c);
  return tem;
}
long long max(long long a, long long b) {
  if (a > b) {
    return a;
  }
  return b;
}
long long min(long long a, long long b) {
  if (a < b) {
    return a;
  }
  return b;
}
long long spf[1000005];
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
void sieve() {
  for (int i = 0; i < 1000005; ++i) {
    spf[i] = i;
  }
  for (int i = 4; i < 1000005; i += 2) {
    spf[i] = 2;
  }
  for (int i = 3; i * i < 1000005; i += 3) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000005; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
}
set<long long> get_factors(long long num) {
  set<long long> s1;
  while (num > 1) {
    s1.insert(spf[num]);
    num = num / spf[num];
  }
  return s1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  sieve();
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  set<long long> tot;
  long long fg = 0;
  for (int i = 0; i < n; ++i) {
    if (fg == 1) {
      break;
    }
    set<long long> s1 = get_factors(a[i]);
    for (auto j = s1.begin(); j != s1.end(); ++j) {
      if (tot.find(*j) == tot.end()) {
        tot.insert(*j);
      } else {
        fg = 1;
        break;
      }
    }
  }
  if (fg == 0) {
    cout << "pairwise coprime";
    return 0;
  }
  long long gc = a[0];
  for (int i = 1; i < n; ++i) {
    gc = gcd(gc, a[i]);
  }
  if (gc == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
  return 0;
}
