#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g(123456 + 5);
vector<bool> eny(123456 + 5);
vector<int> koleny(123456 + 5), deep(123456 + 5);
void dfs(int v, int p = -1) {
  koleny[v] = 0;
  if (eny[v]) koleny[v] = 1;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (to == p) continue;
    deep[to] = deep[v] + 1;
    dfs(to, v);
    koleny[v] += koleny[to];
  }
}
int main() {
  ios_base::sync_with_stdio();
  cin.tie();
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  eny.assign(n + 5, false);
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    eny[k] = true;
  }
  deep.assign(n + 5, 0);
  dfs(1);
  int nom = -1, mdeep = -1;
  for (int i = 1; i <= n; i++)
    if (eny[i] && mdeep < deep[i]) {
      mdeep = deep[i];
      nom = i;
    }
  deep.assign(n + 5, 0);
  dfs(nom);
  int ans = 0;
  mdeep = -1;
  for (int i = 1; i <= n; i++) {
    if (koleny[i] > 0 && m - koleny[i] > 0) ans += 2;
    if (eny[i]) mdeep = max(mdeep, deep[i]);
  }
  for (int i = 1; i <= n; i++)
    if (eny[i] && i < nom && deep[i] == mdeep) nom = i;
  ans -= mdeep;
  printf("%d\n%d", nom, ans);
}
