#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e8;
const int maxn = 200005;
struct edge {
  int to, nex;
} e[maxn << 1];
int head[maxn], cnt, n, lef[maxn];
int sz[maxn], dep[maxn], dp[maxn];
int minn[maxn];
void add(int u, int v) {
  e[cnt].to = v, e[cnt].nex = head[u];
  head[u] = cnt++;
}
void init(int u, int fa) {
  sz[u] = 1;
  for (int i = head[u]; ~i; i = e[i].nex) {
    int v = e[i].to;
    if (v == fa) continue;
    dep[v] = dep[u] + 1;
    init(v, u);
    sz[u] += sz[v];
    lef[u] += lef[v];
  }
  if (sz[u] == 1) lef[u] = 1;
}
int dfs(int u, int fa, int f) {
  int ret = 1;
  if (sz[u] > 1) {
    if (f == dep[u] % 2)
      ret = inf;
    else
      ret = 0;
  }
  for (int i = head[u]; ~i; i = e[i].nex) {
    int v = e[i].to;
    if (v == fa) continue;
    if (f == dep[u] % 2)
      ret = min(ret, dfs(v, u, f));
    else
      ret += dfs(v, u, f);
  }
  minn[u] = ret;
  return ret;
}
int main() {
  memset(head, -1, sizeof(head));
  scanf("%d", &n);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    add(a, b);
    add(b, a);
  }
  if (n == 1) {
    printf("1 1\n");
    return 0;
  }
  dep[1] = 1;
  init(1, -1);
  dfs(1, -1, 1);
  int fians = 0;
  for (int i = head[1]; ~i; i = e[i].nex) {
    int v = e[i].to;
    fians = max(fians, lef[1] - minn[v] + 1);
  }
  printf("%d %d\n", fians, dfs(1, -1, 0));
  return 0;
}
