#include <bits/stdc++.h>
using namespace std;
ifstream fin("test.in");
int dist[123460], sol;
bool atac[123460];
vector<int> graf[123460];
void dfs(int nod, int tt) {
  dist[nod] = dist[tt] + 1;
  for (auto vec : graf[nod]) {
    if (tt == vec) continue;
    dfs(vec, nod);
  }
}
bool dpfs(int nod, int tt) {
  bool c = false, cc = false;
  for (auto vec : graf[nod]) {
    if (tt == vec) continue;
    c = dpfs(vec, nod);
    cc = cc | c;
  }
  if (atac[nod]) cc = true;
  if (cc == true) sol++;
  return cc;
}
int main() {
  int n, m, i, x, y, maxim = 0;
  cin >> n >> m;
  for (i = 1; i < n; i++) {
    cin >> x >> y;
    graf[x].push_back(y);
    graf[y].push_back(x);
  }
  for (i = 1; i <= m; i++) {
    cin >> x;
    atac[x] = true;
  }
  dist[0] = -1;
  dfs(x, 0);
  for (i = 1; i <= n; i++) {
    if (dist[i] > maxim && atac[i] == true) {
      maxim = dist[i];
      x = i;
    }
    dist[i] = 0;
  }
  dfs(x, 0);
  maxim = 0;
  for (i = 1; i <= n; i++)
    if (dist[i] > maxim && atac[i] == true) maxim = dist[i];
  for (i = 1; i <= n; i++) {
    if (dist[i] == maxim && atac[i] == true) x = min(x, i);
    dist[i] = 0;
  }
  dpfs(x, 0);
  cout << x << '\n' << sol * 2 - maxim - 2;
}
