#include <bits/stdc++.h>
using namespace std;
vector<int> v[123456 + 1];
bool mk[123456 + 1];
int dist[123456 + 1], distx[123456 + 1], s;
void dfs(int x, int p, int len) {
  dist[x] = len;
  for (int i = 0; i < v[x].size(); i++)
    if (v[x][i] != p) dfs(v[x][i], x, len + 1);
}
bool dfsx(int x, int p, int len) {
  bool val = mk[x];
  distx[x] = len;
  for (int i = 0; i < v[x].size(); i++)
    if (v[x][i] != p)
      if (dfsx(v[x][i], x, len + 1)) {
        val = true;
        s += 2;
      }
  return val;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, x, y;
  cin >> n >> m;
  for (int i = 0; i < (n - 1); i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  y = -1 * (1 << 30);
  for (int i = 0; i < m; i++) {
    cin >> x;
    mk[x] = true;
    y = max(x, y);
  }
  x = y;
  dfs(x, x, 0);
  y = 0;
  for (int i = 1; i <= n; i++)
    if (mk[i] && dist[i] > y) {
      x = i;
      y = dist[i];
    }
  s = 0;
  if (dfsx(x, x, 0)) {
    y = 0;
    m = x;
    for (int i = 1; i <= n; i++)
      if (mk[i] && distx[i] > y) {
        y = distx[i];
        m = i;
      }
    cout << min(m, x) << "\n";
    cout << (s - y) << "\n";
  }
  return 0;
}
