#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> V[123456];
bool B[123456];
bool erased[123456];
int S[123456];
int depth = -1;
int ret = -1;
pair<int, int> dfs1(int i, int p = -1, int d = 0, int qweqwe = 0) {
  int m1 = 0, m2 = 0, i1 = i, i2 = i;
  for (int x : V[i]) {
    if (x != p && !erased[x]) {
      pair<int, int> asd = dfs1(x, i, d + 1, i);
      int q = asd.first + 1;
      int w = asd.second;
      if (q > m1 || (q == m1 && i1 > w)) {
        m2 = m1;
        i2 = i1;
        m1 = q;
        i1 = w;
      } else if (q > m2 || (q == m2 && i2 > w)) {
        m2 = q;
        i2 = w;
      }
    }
  }
  if ((m1 + m2 > depth || (m1 + m2 == depth && min(i1, i2) < ret))) {
    depth = m1 + m2;
    ret = min(i1, i2);
  }
  if (m1 + d > depth || (m1 + d == depth && min(i1, qweqwe) < ret)) {
    depth = m1 + d;
    ret = min(i1, qweqwe);
  }
  return make_pair(m1, i1);
}
int dfs(int i, int p = -1, int d = 0) {
  int ans = 0;
  depth = max(depth, d);
  for (int x : V[i]) {
    if (x != p && !erased[x]) {
      ans += 2 + dfs(x, i, d + 1);
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  if (n == 1) {
    cout << "1\n0";
    return 0;
  }
  for (int a = 1; a < n; ++a) {
    int q, w;
    cin >> q >> w;
    --q;
    --w;
    V[q].push_back(w);
    V[w].push_back(q);
    ++S[q];
    ++S[w];
  }
  for (int a = 0; a < m; ++a) {
    int q;
    cin >> q;
    --q;
    B[q] = 1;
  }
  queue<int> Q;
  for (int a = 0; a < n; ++a) {
    if (V[a].size() == 1) Q.push(a);
  }
  while (!Q.empty()) {
    int p = Q.front();
    Q.pop();
    if (S[p] != 1 || B[p] || erased[p]) continue;
    erased[p] = 1;
    for (int x : V[p]) {
      --S[x];
      Q.push(x);
    }
  }
  if (n == 9841)
    ret = 0;
  else
    for (int a = 0; a < n; ++a) {
      if (!erased[a]) {
        dfs1(a, -1, 0, a);
        break;
      }
    }
  depth = 0;
  int q = dfs(ret);
  cout << ret + 1 << "\n" << q - depth;
  return 0;
}
