#include <bits/stdc++.h>
using namespace std;
vector<long long> v[123456 + 1], vv[123456 + 1];
long long a[123456 + 1]{0};
long long depth[123456 + 1] = {0};
long long add = 0;
long long dfs(long long cur, long long par) {
  long long xo = 0;
  xo = a[cur];
  for (auto x : v[cur]) {
    if (par != x) {
      long long temp;
      temp = dfs(x, cur);
      if (temp == 1) xo = 1, vv[cur].push_back(x), vv[x].push_back(cur), add++;
    }
  }
  return xo;
}
pair<long long, long long> dfs1(long long cur, long long par, long long dep) {
  pair<long long, long long> ans;
  ans.first = cur;
  ans.second = 0;
  depth[cur] = dep;
  for (auto x : vv[cur]) {
    if (par != x) {
      pair<long long, long long> temp;
      temp = dfs1(x, cur, dep + 1);
      temp.second++;
      if (temp.second > ans.second)
        ans = temp;
      else if (temp.second == ans.second)
        ans = min(ans, temp);
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  long long i, j, n, m;
  cin >> n >> m;
  for (i = 0; i < n - 1; i++) {
    long long x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  long long ls = 0;
  for (i = 0; i < m; i++) {
    long long x;
    cin >> x;
    ls = x;
    a[x] = 1;
  }
  dfs(ls, -1);
  pair<long long, long long> point1 = dfs1(ls, -1, 0);
  pair<long long, long long> point2 = dfs1(point1.first, -1, 0);
  long long mini = min(point1.first, point2.first);
  cout << mini << endl << add * 2 - point2.second;
  return 0;
}
