#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 1e18;
const int N = 131234;
int n, m;
int mark[N];
vector<int> G[N];
int dfs1(int u, int p) {
  int ans = -1;
  if (mark[u]) ans = 0;
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i];
    if (v == p) continue;
    int ch = dfs1(v, u);
    if (ch != -1) {
      if (ans == -1)
        ans = 2 + ch;
      else
        ans += ch + 2;
    }
  }
  return ans;
}
pair<int, int> dfs2(int u, int p, int dep) {
  pair<int, int> ans = pair<int, int>{-1, 0};
  if (mark[u]) ans = pair<int, int>{u, dep};
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i];
    if (v == p) continue;
    pair<int, int> ch = dfs2(v, u, dep + 1);
    if (ans.first == -1 || ch.second > ans.second ||
        (ans.second == ch.second && ch.first < ans.first))
      ans = ch;
  }
  return ans;
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    int i, j;
    for (i = 1; i <= n; ++i) G[i].clear();
    for (i = 1; i < n; ++i) {
      int u, v;
      scanf("%d%d", &u, &v);
      G[u].push_back(v);
      G[v].push_back(u);
    }
    memset(mark, 0, sizeof(mark));
    int goal = 1;
    for (i = 0; i < m; ++i) {
      int u;
      scanf("%d", &u);
      mark[u] = 1;
      goal = u;
    }
    if (m == 1) {
      printf("%d %d\n", goal, 0);
      continue;
    }
    int Max = dfs1(goal, 0);
    pair<int, int> cur = dfs2(goal, 0, 0);
    pair<int, int> net = dfs2(cur.first, 0, 0);
    printf("%d %d\n", min(cur.first, net.first), Max - net.second);
  }
}
