Go: package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"sort"
	"strconv"
)

func main() {
	fmt.Println(resolve(parseProblem(os.Stdin)))
}

func parseProblem(r io.Reader) int {
	const (
		initialBufSize = 100000
		maxBufSize     = 1000000
	)
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines

	return scanInt(sc)
}

func resolve(n int) (int, int) {
	ds := enumDivisors(n)
	max := len(ds) - 1

	cand := map[int]struct{}{}
	for _, d := range ds {
		cand[d] = struct{}{}
	}
	delete(cand, n)
	sort.Sort(sort.Reverse(sort.IntSlice(ds)))
	min := 0
	for _, k := range ds {
		if _, ok := cand[k]; !ok {
			continue
		}
		if len(cand) == 0 {
			break
		}
		for _, kk := range enumDivisors(k) {
			delete(cand, kk)
		}
		min++
	}
	return min, max
}

func pow(n, i int) (res int) {
	res = 1
	for i > 0 {
		if i&1 == 1 {
			res *= n
		}
		i >>= 1
		n *= n
	}
	return res
}

func enumDivisors(n int) (r []int) {
	max := int(math.Sqrt(float64(n))) + 1
	for i := 1; i < max; i++ {
		if n%i == 0 {
			r = append(r, i)
			if n/i != i {
				r = append(r, n/i)
			}
		}
	}
	sort.Sort(sort.IntSlice(r))
	return r
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}
func scanString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}

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

int N;

signed main(){
  
  cin>>N;
  
  set<int> div;
  
  for(int i=1;i*i<=N;i++){
    
    if( N % i == 0 ){
      div.insert(i);
      div.insert(N/i);
    }
    
  }
  
  vector<int> D;
  
  for(auto p : div ){
    if( p != N ) D.push_back(p);
  }
  
  int minv = 0;
  
  set<int> del;
  
  for(int i=(int)D.size()-1;i>=0;i--){
    
    if( del.count(D[i]) == 0 ){
      
      minv++;
      
      for(int j=i-1;j>=0;j--){
	
	if( D[i] % D[j] == 0 ){
	  del.insert(D[j]);
	}
	
      }
      
    }
    
  }
  
  cout<<minv<<' '<<D.size()<<endl;
  
  
  return 0;
}

C++: #include<iostream>
using namespace std;
#define int long long
signed main(){
    long long n;
    cin >> n;
    int tmp = n;

    int cnt = 0;
    for(int i = 2; i*i <= n; i++){
        if(n%i == 0){
            cnt++;
            while(n%i == 0)n /= i;
        }
    }
    if(n > 1){
        //nが1以上のとき、Nは√Nより大きい素因数をもつ
        cnt++;
    }

    cout << cnt << " ";
    n = tmp;
    cnt = 0;
    for(long long i = 1; i*i <= n; i++){
        if(n%i == 0){ //iはnの約数
            cnt++;
            if(i*i != n)cnt++;//n/iの分もカウントする
        }
    }

    cout << cnt-1 << endl;
}

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;
}