#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
vector<bool> atk;
vector<int> d;
int s, ans = 0, t = -1;
bool dfs(int i, int p) {
  d[i] = d[p] + 1;
  bool use = atk[i];
  for (int j = 0; j < g[i].size(); ++j)
    if (g[i][j] != p) {
      if (dfs(g[i][j], i))
        use = true, ++ans;
      else
        swap(g[i][j], g[i].back()), g[i].pop_back(), --j;
    }
  if (use && (t == -1 || d[i] > d[t] || d[i] == d[t] && i < t)) t = i;
  return use;
}
int main() {
  int n, m;
  cin >> n >> m;
  g.resize(n), atk.assign(n, false), d.resize(n);
  for (int i = 0; i < n - 1; ++i) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    g[x].push_back(y), g[y].push_back(x);
  }
  for (int i = 0, x; i < m; ++i) cin >> x, atk[s = x - 1] = true;
  d[s] = -1, dfs(s, s);
  s = t;
  d[t] = -1, dfs(t, t);
  cout << min(s, t) + 1 << '\n' << ans - d[t];
}
