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++: #include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
typedef long long int lli;

vector<pair<lli, lli> > factoring(lli n){
	vector<pair<lli, lli> > res;
	for(lli i=2; i*i<=n; i++){
		if(n%i == 0){
			res.emplace_back(i, 0);
			while(n%i == 0){
				n /= i;
				res.back().second++;
			}
		}
	}
	if(n != 1){
		res.emplace_back(n, 1);
	}
	return res;
}

int main(){
	lli n;
	cin >> n;
	auto fact = factoring(n);
	lli numfact = 1;
	for(auto p: fact){
		numfact *= p.second +1;
	}
	cout << fact.size() << " " << numfact-1 << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF=1e9,MOD=1e9+7;
const ll LINF=1e18;
using namespace std;
#define int long long

signed main(){
  int N;cin>>N;
  map<int,int> m;
  for(int i=2;i*i<=N;i++){
    if(N%i==0){
      m[i]++;
      N/=i;
      i=1;
    }
  }
  m[N]++;
  cout<<m.size()<<" ";
  int ans=1;
  for(auto p:m)ans*=(p.second+1);
  cout<<ans-1<<endl;
}

C++: #include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define rep(N) for (int i = 0; i < N; ++i)
#define Rep(a, b) for (int i = a; i < b; ++i)
#define For(i, N) for (int i = 0; i < N; ++i)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define makei(N) int N; cin >> N;
#define makel(N) ll N; cin >> N;
#define makes(s) string s; cin >> s;
#define maked(d) double d; cin >> d;
#define makev(v, N) vi v(N); rep(N)cin >> v[i];
#define mod 1000000007
#define distance(x1,y1,x2,y2) sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2));

using namespace std;
using ll = long long int;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vs = vector<string>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using msi = map<string, int>;

template<typename T>
void say(T s) {
	cout << s << "\n";
}

template<typename T>
void say(vector<T> s) {
	auto itr = s.begin();
	if (itr == s.end())return;
	cout << *(itr++);
	while (itr != s.end()) {
		cout << " " << *(itr++);
	}
	cout << "\n";
}

void yn(bool b) {
	if (b)say("yes");
	else say("no");
}

void Yn(bool b) {
	if (b)say("Yes");
	else say("No");
}

void YN(bool b) {
	if (b)say("YES");
	else say("NO");
}

template<typename T>
void maxi(T& a, T b) {
	a = max(a, b);
}

template<typename T>
void mini(T& a, T b) {
	a = min(a, b);
}

void exact_say(double x) {
	cout << setprecision(numeric_limits<double>::max_digits10) << x << endl;
}

template<class T> void getVector(vector<T>& v) {
	for (int i = 0; i < v.size(); ++i)
		cin >> v[i];
}

vector<ll> enum_div(ll n) {//約数列挙
	vector<ll> ans;
	for (ll i = 1; i * i <= n; ++i) {
		if (n % i == 0) {
			ans.push_back(i);
			if (i != 1 && i * i != n) {
				ans.push_back(n / i);
			}
		}
	}
	return ans;
}

int main() {
	ll n;
	cin >> n;
	vector<ll> st = enum_div(n);
	sort(all(st));
	ll Min = 0;
	ll Max = st.size();
	while (st.size() > 0) {
		Min++;
		ll a = st.back();
		st.erase(st.end() - 1);
		vector<ll> ay = enum_div(a);
		for (auto it = ay.begin(); it != ay.end(); ++it) {
			auto ity = equal_range(all(st), *it);
			st.erase(ity.first, ity.second);
		}
	}
	cout << Min << " " << Max << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define MOD (1000000007)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1}; // 移動方向

ll n;

void input(){
    cin >> n;
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    input();
    ll mx = 1;
    ll mn;
    vector<ll> yakusu;
    vector<ll> soinsu;
    for(ll i=2;i*i<=n;i++){
        while(n%i==0){
            soinsu.push_back(i);
            n/=i;
        }
    }
    if(n != 1) soinsu.push_back(n);
    yakusu = soinsu;
    sort(soinsu.begin(), soinsu.end());
    soinsu.erase(unique(soinsu.begin(), soinsu.end()), soinsu.end());
    mn = soinsu.size();
    map<ll, ll> cnt;
    for(int i=0;i<yakusu.size();i++){
        cnt[yakusu[i]]++;
    }
    for(auto p:cnt){
        mx *= p.second+1;
    }
    cout << mn << ' ' << mx-1 << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define LINF (ll)INF*INF
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,a,n) for(int i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

#define int ll //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vp;

int gcd(int a, int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int lcm(int a, int b){
    return a/gcd(a,b)*b;
}

template<typename T>
map<T, int> factorize(T x){
  map<T, int> res;
  for(int i=2;i*i<=x;i++){
    while(x%i==0){
      x/=i;
      res[i]++;
    }
  }
  if(x!=1) res[x]++;
  return res;
}


signed main(void) {
    int n;
    cin >> n;
    vi v;
    for(int i = 1; i*i <= n; i++)if(n%i == 0){
        v.push_back(i);
        if(i != 1 && i*i<n)v.push_back(n/i);
    }
    int cnt = factorize(n).size();
    cout << cnt << " " << v.size() << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;

template <typename T>
vector<pair<T, int>> factorize(T x) {
	vector<pair<T, int>> res;
	for (T i = 2; i * i <= x; i++) {
		if (x % i == 0) {
			res.emplace_back(i, 0);
			while (x % i == 0) {
				res.back().second++;
				x /= i;
			}
		}
	}
	if (x > 1) {
		if (!res.empty() && res.back().first == x)
			res.back().second++;
		else
			res.emplace_back(x, 1);
	}
	return res;
}

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	ll n;
	cin >> n;
	auto ps = factorize(n);
	ll mi = ps.size(), ma = 1;
	for (auto pp : ps) {
		ma *= pp.second + 1;
	}
	cout << mi << ' ' << ma - 1 << endl;
	return 0;
}