Go: package main

import (
	"fmt"
	"math"
)

func main() {
	var on int
	fmt.Scan(&on)
	m := make(map[int]int)
	loop := true
	n := on
	for loop {
		loop = false
		for i := 2; i <= int(math.Sqrt(float64(n))); i++ {
			if n%i == 0 {
				m[i]++
				n /= i
				loop = true
				break
			}
		}
	}
	if n != 1 {
		m[n]++
	}

	var cnt int
	for i := 1; i <= int(math.Sqrt(float64(on))); i++ {
		if on%i == 0 {
			if on/i == i {
				cnt++
			} else {
				cnt += 2
			}
		}
	}

	fmt.Printf("%d %d\n", len(m), cnt-1)
}

C++: /*  -*- coding: utf-8 -*-
 *
 * 2932.cc: 
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 100;
const int MAX_P = 1000000 + 50;

/* typedef */

typedef long long ll;

/* global variables */

bool primes[MAX_P + 1];
int pnums[MAX_P + 1];

/* subroutines */

int gen_primes(int maxp, int pnums[]) {
  memset(primes, true, sizeof(primes));
  primes[0] = primes[1] = false;

  int p, pn = 0;
  for (p = 2; p * p <= maxp; p++)
    if (primes[p]) {
      pnums[pn++] = p;
      for (int q = p * p; q <= maxp; q += p) primes[q] = false;
    }
  for (; p <= maxp; p++)
    if (primes[p]) pnums[pn++] = p;
  return pn;
}

/* main */

int main() {
  int pn = gen_primes(MAX_P, pnums);
  //printf("pn=%d\n", pn);

  ll n;
  scanf("%lld", &n);

  int maxc = 0;
  for (ll p = 1; p * p <= n; p++)
    if (n % p == 0) {
      ll q = n / p;
      maxc += (p != q) ? 2 : 1;
    }

  ll r = n;
  int minc = 0;
  for (int i = 0; (ll)pnums[i] * pnums[i] <= r; i++) {
    int &pi = pnums[i];
    if (r % pi == 0) {
      minc++;
      while (r % pi == 0) r /= pi;
    }
  }
  if (r > 1) minc++;

  printf("%d %d\n", minc, maxc - 1);
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (long long i = 0, max_i = (n); i < max_i; i++)
#define REPI(i, a, b) for (long long i = (a), max_i = (b); i < max_i; i++)
#define ALL(obj) begin(obj), end(obj)
#define RALL(obj) rbegin(obj), rend(obj)
#define fi first
#define se second
using ii = pair<int, int>;
template <class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template <class T> inline bool chmin(T &a, const T &b) { if (a > b) { a = b; return true; } return false; }

// debug
template <class T> ostream& operator<<(ostream &s, vector<T>& d) { REP (i, d.size()) s << d[i] << (i == d.size() - 1 ? "" : " "); return s; }
template <class T> ostream& operator<<(ostream &s, vector<vector<T>>& d) { REP (i, d.size()) s << d[i] << (i == d.size() - 1 ? "" : "\n"); return s; }
template <class T, class S> ostream& operator<<(ostream &s, pair<T, S>& p) { s << "{" << p.first << ", " << p.second << "}"; return s; }
template <class T, class S> ostream& operator<<(ostream& s, map<T, S> m) { for (auto it = m.begin(); it != m.end(); it++) { s << *it << (next(it) == m.end() ? "" : "\n"); } return s; }
#ifdef _MY_DEBUG
  #define dump(...) cerr << "/* " << #__VA_ARGS__ << " :[" << __LINE__ << ":" << __FUNCTION__ << "]" << endl, dump_func(__VA_ARGS__), cerr << "*/\n\n";
#else
  #define dump(...)
#endif
void dump_func() { cerr << endl; }
template <class Head, class... Tail> void dump_func(Head&& h, Tail&&... t) { cerr << h << (sizeof...(Tail) == 0 ? "" : ", "), dump_func(forward<Tail>(t)...); }

struct Fast { Fast() { cin.tie(0); ios::sync_with_stdio(false); } } fast;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
constexpr int MOD = 1000000007;
// *************** TEMPLATE END *************** 

signed main() {
  int n; cin >> n;
  map<int, int> mp;
  for (int x = 2; x * x <= n; x++) {
    while (n % x == 0) {
      mp[x]++;
      n /= x;
    }
  }
  if (n > 1) mp[n]++;
  int ans = 1;
  dump(mp);
  for (auto& p: mp) {
    ans *= (p.se + 1);
  }
  cout << mp.size() << ' ' << ans - 1 << endl;
}

C++: #include <iostream>
using namespace std;

int main() {
    long long N; cin >> N;
    long long mi = 0, ma = 1;
    for (long long p = 2; p * p <= N; ++p) {
        if (N % p != 0) continue;
        int num = 0;
        while (N % p == 0) {
            N /= p;
            ++num;
        }
        ++mi;
        ma *= (num + 1);
    }
    if (N != 1) {
        ++mi;
        ma *= 2;
    }
    cout << mi << " " << ma-1 << endl;
}