#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > tr;
bool attack[123459];
int mx1[123459];
int mx2[123459];
int mxIn[123459];
int par[123459];
int len[123459];
vector<int> ord;
int tot;
int dfs(int i, int p) {
  mx1[i] = -100000000;
  mx2[i] = -100000000;
  mxIn[i] = i;
  par[i] = p;
  if (attack[i]) {
    mx1[i] = 0;
  }
  len[i] = 0;
  ord.push_back(i);
  for (int j = 0; j < tr[i].size(); j++) {
    if (tr[i][j] == p) continue;
    int r = 1 + dfs(tr[i][j], i);
    if (r > 0) len[i] += 2;
    if (r > mx1[i]) {
      mx2[i] = mx1[i];
      mx1[i] = r;
      mxIn[i] = tr[i][j];
    } else if (r > mx2[i]) {
      mx2[i] = r;
    }
  }
  return mx1[i];
}
int dfs2(int i, int p) {
  bool add = 0;
  if (attack[i]) add = true;
  int r = 0;
  for (int j = 0; j < tr[i].size(); j++) {
    if (tr[i][j] == p) continue;
    r += dfs2(tr[i][j], i);
  }
  if (add || r)
    return r + 1;
  else
    return 0;
}
int main() {
  tot = 0;
  int n, m;
  scanf("%d %d", &n, &m);
  tr = vector<vector<int> >(n);
  memset(attack, 0, sizeof(attack));
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    u--;
    v--;
    tr[u].push_back(v);
    tr[v].push_back(u);
  }
  int root = -1;
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    attack[x - 1] = true;
    root = x - 1;
  }
  dfs(root, -1);
  int tot = dfs2(root, -1) - 1;
  tot *= 2;
  for (int i = 0; i < ord.size(); i++) {
    int in = ord[i];
    if (par[in] == -1) continue;
    if (mxIn[par[in]] == in) {
      if (1 + mx2[par[in]] > mx1[in]) {
        mx2[in] = mx1[in];
        mx1[in] = 1 + mx2[par[in]];
        mxIn[in] = par[in];
      } else if (1 + mx2[par[in]] > mx2[in]) {
        mx2[in] = 1 + mx2[par[in]];
      }
    } else {
      if (1 + mx1[par[in]] > mx1[in]) {
        mx2[in] = mx1[in];
        mx1[in] = 1 + mx1[par[in]];
        mxIn[in] = par[in];
      } else if (1 + mx1[par[in]] > mx2[in]) {
        mx2[in] = 1 + mx1[par[in]];
      }
    }
  }
  int mx = -1;
  for (int i = 0; i < n; i++) {
    if (attack[i] && (mx == -1 || mx1[i] > mx1[mx])) mx = i;
  }
  cout << mx + 1 << endl;
  cout << tot - mx1[mx] << endl;
}
