#include "bits/stdc++.h"
using namespace std;
const int maxn = 222;
int u[maxn], v[maxn];
vector<int> g[maxn];
int seen[maxn], dep[maxn];
int main(){
    int n;
    cin >> n;
    for(int e = 0; e < n - 1; e++) cin >> u[e] >> v[e];
    long long coloring = LLONG_MAX;
    long long leafs = coloring;
    for(int e = 0; e < n - 1; e++) g[u[e]].push_back(v[e]);
    for(int e = 0; e < n - 1; e++) g[v[e]].push_back(u[e]);
    int bdep = n + n;
    vector<int> cand;
    for(int e = 1; e <= n; e++){
        memset(seen, 0, sizeof(seen));
        memset(dep, 0, sizeof(dep));
        queue<int> q;
        seen[e] = 1;
        q.push(e);
        while(!q.empty()){
            int cur = q.front(); q.pop();
            for(int nxt : g[cur]){
                if(!seen[nxt]){
                    seen[nxt] = 1;
                    dep[nxt] = dep[cur] + 1;
                    q.push(nxt);
                }
            }
        }
        int gep = 0;
        for(int f = 1; f <= n; f++) gep = max(gep, dep[f]);
        if(bdep > gep) cand.clear(), bdep = gep;
        if(bdep == gep) cand.push_back(e);
    }
    for(int e = 0; e < n - 1; e++){
        memset(seen, 0, sizeof(seen));
        memset(dep, 0, sizeof(dep));
        queue<int> q;
        seen[u[e]] = 1;
        seen[v[e]] = 1;
        q.push(u[e]);
        q.push(v[e]);
        while(!q.empty()){
            int cur = q.front(); q.pop();
            for(int nxt : g[cur]){
                if(!seen[nxt]){
                    seen[nxt] = 1;
                    dep[nxt] = dep[cur] + 1;
                    q.push(nxt);
                }
            }
        }
        int gep = 0;
        for(int f = 1; f <= n; f++) gep = max(gep, dep[f]);
        if(bdep > gep) cand.clear(), bdep = gep;
        if(bdep == gep) cand.push_back(-e);
    }
    coloring = bdep + 1;
    for(int pv : cand){
        if(pv >= 1){
            long long im = 0;
            memset(seen, 0, sizeof(seen));
            vector<int> q, nq;
            seen[pv] = 1;
            q.push_back(pv);
            for(int f = 0; f < bdep; f++){
                int mx_sons = 0;
                for(int u : q) {
                    int sons = 0;
                    for(int nxt : g[u]) if(!seen[nxt]) sons++;
                    mx_sons = max(mx_sons, sons);
                }
                long long nim = 0;
                for(int u : q) {
                    int sons = 0;
                    for(int nxt : g[u]) if(!seen[nxt]){
                        sons++;
                        nq.push_back(nxt);
                        seen[nxt] = 1;
                    }
                    nim += mx_sons - sons;
                }
                nim += im * mx_sons;
                q = nq;
                nq.clear();
                im = nim;
            }
            // cout << "descri vert" << endl;
            // cout << pv << endl;
            // cout << q.size() << " " << im << endl;
            // cout << endl;
            leafs = min(leafs, (long long)q.size() + im);
        } else {
            long long im = 0;
            memset(seen, 0, sizeof(seen));
            vector<int> q, nq;
            seen[u[-pv]] = 1;
            seen[v[-pv]] = 1;
            q.push_back(u[-pv]);
            q.push_back(v[-pv]);
            for(int f = 0; f < bdep; f++){
                int mx_sons = 0;
                for(int u : q) {
                    int sons = 0;
                    for(int nxt : g[u]) if(!seen[nxt]) sons++;
                    mx_sons = max(mx_sons, sons);
                }
                long long nim = 0;
                for(int u : q) {
                    int sons = 0;
                    for(int nxt : g[u]) if(!seen[nxt]){
                        sons++;
                        nq.push_back(nxt);
                        seen[nxt] = 1;
                    }
                    nim += mx_sons - sons;
                }
                nim += im * mx_sons;
                q = nq;
                nq.clear();
                im = nim;
            }
            // cout << "descri edge" << endl;
            // cout << u[-pv] << " " << v[-pv] << endl;
            // cout << q.size() << " " << im << endl;
            // cout << endl;
            leafs = min(leafs, (long long)q.size() + im);
        }
    }
    cout << coloring << " " << leafs << endl;
	return 0;
}


Measured memory_bytes: 256