#include <bits/stdc++.h>
using namespace std;
int n, m, x, y, total_dist;
bool chosen[124456];
vector<int> adj[124456];
pair<int, int> res;
bool dfs(int ind, int par, int dist) {
  bool ok = false;
  if (chosen[ind]) {
    ok = true;
    res = max(res, pair<int, int>(dist, -ind));
  }
  for (int i = 0; i < adj[ind].size(); i++) {
    int elem = adj[ind][i];
    if (elem == par) continue;
    if (dfs(elem, ind, dist + 1)) {
      total_dist++;
      ok = true;
    }
  }
  return ok;
}
int main() {
  cin >> n >> m;
  memset(chosen, 0, sizeof(chosen));
  for (int i = n - 1; i; i--) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = m; i; i--) {
    cin >> x;
    chosen[x] = true;
  }
  res = pair<int, int>(0, -10e9);
  dfs(x, 0, 0);
  pair<int, int> aux = res;
  total_dist = 0;
  dfs(-res.second, 0, 0);
  cout << -max(res.second, aux.second) << endl;
  cout << 2 * total_dist - res.first << endl;
  return 0;
}
