#include <bits/stdc++.h>
using namespace std;
vector<int> a[300300];
struct node {
  int N, P;
};
int e[300300], ee[300300], XY[300300], f[300300], O, i, n, m, x, y, S, maxn;
int df(int t, int w) {
  int i;
  for (i = 0; i < a[t].size(); i++)
    if (a[t][i] != w) XY[t] |= df(a[t][i], t);
  if (f[t]) XY[t] = 1;
  S += XY[t];
  return XY[t];
}
void dfs(int t, int w) {
  int i, X, XX, F = 0;
  node maxn1, maxn2;
  maxn1.P = maxn2.P = 0;
  maxn1.N = maxn2.N = t;
  for (i = 0; i < a[t].size(); i++)
    if (a[t][i] != w && XY[a[t][i]]) {
      dfs(a[t][i], t);
      F = 1;
      X = e[a[t][i]] + 1;
      XX = ee[a[t][i]];
      if (X > maxn1.P || (X == maxn1.P && XX < maxn1.N))
        maxn2 = maxn1, maxn1.P = X, maxn1.N = XX;
      else if (X > maxn2.P || (X == maxn2.P && XX < maxn2.N))
        maxn2.P = X, maxn2.N = XX;
    }
  X = maxn1.P + maxn2.P;
  XX = min(maxn1.N, maxn2.N);
  if (X > maxn || (X == maxn && O > XX)) maxn = X, O = XX;
  if (F)
    ee[t] = maxn1.N;
  else
    ee[t] = t;
  e[t] = maxn1.P;
}
int main() {
  scanf("%d %d", &n, &m);
  for (i = 1; i < n; i++) {
    scanf("%d %d", &x, &y);
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (i = 1; i <= m; i++) scanf("%d", &x), f[x] = 1;
  for (i = 1; i <= n; i++)
    if (f[i]) break;
  O = i;
  df(i, 0);
  dfs(i, 0);
  printf("%d\n%d\n", O, (S - 1) * 2 - maxn);
  return 0;
}
