  #include <bits/stdc++.h>
  using namespace std;

  #define ll long long
  #define int long long
  #define f(i,l,n) for(ll i=l;i<n;i++)
  #define E "\n"
  #define bp __builtin_popcount
  const int M = 1e9+7;

  
  int32_t main()
  {

  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  #endif

    int n;
    cin >> n;
    vector<int> a(n);
    map<int,int> mp;
    f(i,0,n) cin >> a[i],mp[a[i]]++;

    const int N=1e6+5;
    bool flg=true;
    vector<bool> isp(N,0);
    f(i,2,N)
    {
      if(isp[i]==0)
      {
          int cnt=0;
          for(int j=i*i;j<N;j+=i) isp[j]=1,cnt+=mp[j];
          if(cnt>1) 
          {
            flg=false;
            break;
          }
      }

    }

    int g=0;
      f(i,0,n) g=__gcd(g,a[i]);
      if(g==1 and flg) cout<<"pairwise coprime\n";
      else if(g==1) cout<<"setwise coprime\n";
      else cout<<"not coprime\n";

    return 0;
  }