#include <bits/stdc++.h>
using namespace std;
template <class T>
bool checkMin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool checkMax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
vector<int> adj[200009], lvl[200009], q, dj[200009];
set<int> s1, s2;
int maxlvl, l[200009], vis[200009], P[200009];
pair<int, int> arr[200009][2];
void dfs(int nd, int pr) {
  l[nd] = l[pr] + 1;
  P[nd] = pr;
  checkMax(maxlvl, l[nd]);
  lvl[l[nd]].push_back(nd);
  for (int i = 0; i < adj[nd].size(); i++)
    if (adj[nd][i] != pr) dfs(adj[nd][i], nd);
}
void dfs1(int nd, int pr) {
  arr[nd][0].second = nd;
  for (int i = 0; i < dj[nd].size(); i++) {
    int to = dj[nd][i];
    if (to != pr) {
      dfs1(to, nd);
      if (arr[to][0].first + 1 > arr[nd][0].first) {
        swap(arr[nd][0], arr[nd][1]);
        arr[nd][0].first = arr[to][0].first + 1;
        arr[nd][0].second = arr[to][0].second;
      } else if (arr[to][0].first + 1 > arr[nd][1].first) {
        arr[nd][1].first = arr[to][0].first + 1;
        arr[nd][1].second = arr[to][0].second;
      }
    }
  }
}
void dfs2(int nd, int pr) {
  if (pr != 0) {
    pair<int, int> das = arr[pr][0];
    if (das.second == arr[nd][0].second) das = arr[pr][1];
    das.first++;
    if (das.first > arr[nd][0].first) {
      swap(arr[nd][0], arr[nd][1]);
      arr[nd][0] = das;
    } else if (das.first > arr[nd][1].first)
      arr[nd][1] = das;
  }
  for (int i = 0; i < dj[nd].size(); i++)
    if (dj[nd][i] != pr) dfs2(dj[nd][i], nd);
}
int main() {
  int a, b, x, e = 0;
  cin >> a >> b;
  for (int i = 1; i < a; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = 0; i < b; i++) cin >> x, vis[x] = 1;
  dfs(1, 0);
  for (int i = maxlvl; i >= 1; i--) {
    for (int j = 0; j < lvl[i].size(); j++)
      if (vis[lvl[i][j]] == 1) s1.insert(lvl[i][j]), b--;
    e += s1.size();
    for (typeof((s1).begin()) i = (s1).begin(); i != (s1).end(); i++)
      q.push_back(*i);
    if (s1.size() == 1 && b == 0) break;
    for (typeof((s1).begin()) i = (s1).begin(); i != (s1).end(); i++) {
      int z = *i;
      s2.insert(P[z]);
      dj[z].push_back(P[z]);
      dj[P[z]].push_back(z);
    }
    s1 = s2;
    s2.clear();
  }
  dfs1(x, 0);
  dfs2(x, 0);
  int ans = 0, mini = 1000000007;
  for (int i = 0; i < q.size(); i++) checkMax(ans, arr[q[i]][0].first);
  for (int i = 0; i < q.size(); i++)
    if (arr[q[i]][0].first == ans) checkMin(mini, q[i]);
  cout << mini << endl;
  cout << 2 * (e - 1) - ans << endl;
  return 0;
}
