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 <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
#include <stack>


using namespace std;
using ll = long long;
using ull = unsigned long long;

const ll INF = 1e16;
const ll MOD = 1e9 + 7;

#define REP(i, n) for(ll i = 0; i < n; i++)






int main() {
    ll n;
    cin >> n;
    vector<ll> y = {1};
    for(ll i = 2; i <= sqrt(n); i++){
        if(n % i == 0){
            y.push_back(i);
            y.push_back(n / i);
        }
    }
    sort(y.begin(), y.end());
    y.erase(unique(y.begin(), y.end()), y.end());
    map<ll, bool> out;
    vector<ll> v;
    for(ll i = y.size() - 1; i >= 1; i--){
        if(out[y[i]]) continue;
        v.push_back(y[i]);
        for(ll j = 2; j <= sqrt(y[i]); j++){
            if(y[i] % j == 0){
                out[j] = true;
                out[y[i] / j] = true;
            }
        }
    }
    if(v.empty()) v.push_back(1);
    cout << v.size() << " " << y.size() << endl;
}

C++: #include <bits/stdc++.h>

using namespace std;

#define ALL(x) (x).begin(), (x).end()
#define AND(x,y,z) 
#define DUMP(xs) for (auto x:xs) cout<<x<<' ';cout<<endl
#define DUMPP(xs) for (auto x:xs) cout<<'('<<x.first<<','<<x.second<<')';cout<<endl
#define FOR(i,a,b) for (ll i=(ll)(a);i<(ll)(b);++i)
#define OUT(x) cout<<x<<endl
#define REP(i,n) FOR(i,0,n)
#define YES(cond) cond ? OUT("YES") : OUT("NO")
#define Yes(cond) cond ? OUT("Yes") : OUT("No")

template<class T> T gcd(const T x,const T y){if(!y){return x;}return gcd(y,x%y);}
template<class T> T lcm(const T x,const T y){return x/gcd(x,y)*y;};
template<class T> T modpow(const T x,const T n,const T mod) {
  T res=1;while(n>0){if(n%2)res=res*x%mod;x=x*x%mod;n/=2;};return res;
}
template<class T> bool alltrue(const T &a){return all_of(ALL(a),[](bool x){return x;});}
template<class T> bool anytrue(const T &a){return any_of(ALL(a),[](bool x){return x;});}
template<class T> bool contain(const T &a,const T &b){for(auto x:b){if (a.find(x)==a.end()){return false;}}return true;}
template<class T> bool mmax(T &m,const T q){ if (m < q) {m = q; return true;} else return false; }
template<class T> bool mmin(T &m,const T q){ if (m > q) {m = q; return true;} else return false; }
template<class T> int siz(const T &a) {return (int)a.size();}
template<class T> set<T> devisers(T n) {
  set<T> res;for(T i=1;i<(T)sqrt(n)+1;i++){if(n%i==0){res.insert(i);res.insert(n/i);}}return res;
}
template<class T> void concat(T &a, const T &b){a.insert(a.end(),b.begin(),b.end());}
template<class T> void getand(const T &a,const T &b,T &c) {
  set_intersection(a.begin(),a.end(),b.begin(),b.end(),inserter(c,c.end()));
}
template<class T> void getor(const T &a,const T &b,T &c) {
  set_union(a.begin(),a.end(),b.begin(),b.end(),inserter(c,c.end()));
}

typedef long long ll;
typedef pair<ll, ll> P;

const ll MOD=1e9+7;
const int MAX=1e5+100;

set<ll> divisers(ll n) {
  set<ll> res;
  FOR(i,1,(ll)sqrt(n)+1) {
    if (n%i == 0) {
      res.insert(i);
      res.insert(n/i);
    }
  }
  return res;
}

vector<P> factorize(ll n) {
  vector<P> res;
  FOR(i,2,(ll)(sqrt(n))+1) {
    if (n%i==0) {
      ll cnt = 0;
      while (n%i==0) {
        n /= i;
        cnt++;
      }
      res.push_back({i,cnt});
    }
  }
  if (n > 1) res.push_back({n,1});
  return res;
}

int main() {
  ll N;cin>>N;
  set<ll> d = divisers(N);
  vector<P> f = factorize(N);

  // 素数
  if (siz(d)==2) {
    cout<<1<<' '<<1<<endl;
  } else {
    // 最大は約数の数-1だけ
    ll ma = siz(d)-1;
    // 最小は素因数の数
    ll mi = siz(f);
    cout<<mi<<' '<<ma<<endl;
  }

  return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
map<ll, int> enumpr(ll n) {
    map<ll, int> V;
    for (ll i = 2; i*i <= n; i++) while (n%i == 0) V[i]++, n /= i;
    if (n > 1) V[n]++;
    return V;
}
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　 |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/












ll N;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N;

    auto ep = enumpr(N);

    int ans1 = ep.size();
    int ans2 = 1;
    fore(p, ep) ans2 *= (p.second + 1);
    ans2--;

    printf("%d %d\n", ans1, ans2);
}




/*

18 = 2 * 3^2

1 2 3 6 9

2 * 3 * 5

2^2 * 3 * 5

*/

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

vector<int64_t> prime_factor(int64_t n){
    vector<int64_t> ret;
    for(int64_t i=2; i*i<=n; i++){
        if(n % i == 0){
            while(n % i == 0) n /= i;
            ret.push_back(i);
        }
    }
    if(n > 1) ret.push_back(n);
    return ret;
}

int main(){
    int64_t N;
    cin >> N;
    int mx = -1;
    for(int64_t i=1; i*i<=N; i++){
        if(N%i == 0){
            mx++;
            if(i < N/i) mx++;
        }
    }

    int mn = prime_factor(N).size();
    cout << mn << " " << mx << endl;
}

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

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

signed main(){
    int N;cin>>N;
    int cnt1=0,cnt2=1;
    for(int i=2;i*i<=N;i++){
        if(N%i)continue;
        cnt1++;
        int num=0;
        while(N%i==0){
            N/=i;
            num++;
        }
        cnt2*=num+1;
    }

    if(N!=1){
        cnt1++;cnt2*=2;
    }
    cout<<cnt1<<" "<<cnt2-1<<endl;
}