#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int N = 2e5 + 10;
int n, m, sub[N], p[N], q[N];
vector<int> v[N];
long long f[N];
int d[2][N];
void prepare() {
  scanf("%d%d", &n, &m);
  int x, y;
  for (auto i = 1; i <= n - 1; i++) {
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  while (m--) {
    scanf("%d", &x);
    sub[x] = 1;
  }
}
void BFS() {
  int top = 1, bot = 1;
  q[1] = 1;
  while (top <= bot) {
    int x = q[top++];
    for (auto y : v[x])
      if (y != p[x]) {
        p[y] = x;
        q[++bot] = y;
      }
  }
}
int finddist(int type, int st) {
  int top = 1, bot = 1;
  q[1] = st;
  memset(d[type], 0, sizeof(d[type]));
  d[type][st] = 1;
  while (top <= bot) {
    int x = q[top++];
    for (auto y : v[x])
      if (!d[type][y]) {
        d[type][y] = d[type][x] + 1;
        q[++bot] = y;
      }
  }
  int ans = st;
  for (auto i = 1; i <= n; i++)
    if (sub[i] && d[type][i] > d[type][ans]) ans = i;
  return ans;
}
void solve() {
  int sel1 = finddist(0, 1), sel2 = finddist(1, sel1);
  finddist(0, sel2);
  BFS();
  for (auto i = n; i >= 1; i--) {
    int x = q[i];
    for (auto y : v[x])
      if (y != p[x]) {
        sub[x] += sub[y];
        if (sub[y]) f[x] += f[y] + 2;
      }
  }
  for (auto i = 1; i <= n; i++) {
    int x = q[i];
    for (auto y : v[x])
      if (y != p[x]) {
        int tsub = sub[x] - sub[y], tf = f[x] - (sub[y] ? f[y] + 2 : 0);
        if (tsub) f[y] += tf + 2;
        sub[y] = sub[x];
      }
  }
  for (auto i = 1; i <= n; i++) f[i] -= max(d[0][i], d[1][i]) - 1;
  int ans = min_element(f + 1, f + n + 1) - f;
  cout << ans << "\n" << f[ans];
}
int main() {
  prepare();
  solve();
}
