#include <bits/stdc++.h>
using namespace std;
vector<int> V[123499];
int W[123499], n, u, v, i, j, m, s, a, b, r;
bool Q[123499], H[123499];
pair<int, int> f(int x) {
  pair<int, int> t;
  int i, v = x, mx = 0;
  H[x] = 1;
  for (i = 0; i < V[x].size(); i++)
    if (!H[V[x][i]]) {
      t = f(V[x][i]);
      t.first++;
      if (m < mx + t.first) {
        m = mx + t.first;
        a = min(v, t.second);
      } else if (m == mx + t.first) {
        if (a > min(v, t.second)) {
          a = min(v, t.second);
        }
      }
      if (mx < t.first) {
        mx = t.first;
        v = t.second;
      } else if (mx == t.first)
        v = min(v, t.second);
    }
  return make_pair(mx, v);
}
int g(int x) {
  int h, i;
  h = Q[x];
  H[x] = 1;
  for (i = 0; i < V[x].size(); i++)
    if (!H[V[x][i]]) h |= g(V[x][i]);
  H[x] = !h;
  r -= !h;
  return h;
}
int main() {
  cin >> n >> m;
  for (i = n; --i;) {
    cin >> u >> v;
    V[u].push_back(v);
    W[u]++;
    V[v].push_back(u);
    W[v]++;
  }
  while (m--) {
    cin >> v;
    Q[v] = 1;
  }
  r = n;
  g(v);
  m = 0;
  f(v);
  cout << (!a ? v : a) << endl << 2 * (r - m - 1) + m;
  return 0;
}
