#include <bits/stdc++.h>
using namespace std;
const int N = 200200;
const int Inf = 1e9;
void DFS1(int i, int p = 0);
void DFS2(int i, int p = 0);
void DFS3(int i, int p = 0);
void max_self(int& x, int y) { x = max(x, y); }
void man_self(pair<int, int>& p1, pair<int, int> p2) {
  if (p1.first < p2.first || (p1.first == p2.first && p1.second > p2.second))
    p1 = p2;
}
int a[N];
bool b[N];
bool IsAttaked[N];
int Dp1[N];
int Dp2[N];
vector<int> Adj[N];
vector<int> Pref[N];
vector<int> Suff[N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    Adj[x].push_back(y);
    Adj[y].push_back(x);
  }
  for (int i = 1; i <= m; i++) scanf("%d", a + i), IsAttaked[a[i]] = true;
  DFS1(a[1]);
  DFS2(a[1]);
  DFS3(a[1]);
  pair<int, int> Ans = pair<int, int>(0, Inf);
  for (int i = 1; i <= m; i++)
    man_self(Ans, pair<int, int>(max(Dp1[a[i]], Dp2[a[i]]), a[i]));
  int Sum = 0;
  for (int i = 1; i <= n; i++) Sum += b[i];
  Sum = 2 * (Sum - 1);
  printf("%d\n%d", Ans.second, Sum - Ans.first);
}
void DFS1(int i, int p) {
  b[i] = IsAttaked[i];
  for (auto j : Adj[i])
    if (j != p) DFS1(j, i), b[i] |= b[j];
}
void DFS2(int i, int p) {
  for (auto j : Adj[i])
    if (j != p && b[j]) {
      DFS2(j, i);
      max_self(Dp1[i], 1 + Dp1[j]);
    }
  Pref[i].resize(Adj[i].size());
  Suff[i].resize(Adj[i].size());
  for (int j = 0; j < Adj[i].size(); j++) {
    int k = Adj[i][j];
    Pref[i][j] = (k != p && b[k] ? Dp1[k] : -Inf);
    if (j > 0) max_self(Pref[i][j], Pref[i][j - 1]);
  }
  for (int j = (int)Adj[i].size() - 1; j >= 0; j--) {
    int k = Adj[i][j];
    Suff[i][j] = (k != p && b[k] ? Dp1[k] : -Inf);
    if (j + 1 < Adj[i].size()) max_self(Suff[i][j], Suff[i][j + 1]);
  }
}
void DFS3(int i, int p) {
  for (int j = 0, k; j < Adj[i].size(); j++)
    if (k = Adj[i][j], k != p && b[k]) {
      Dp2[k] =
          max(1 + Dp2[i], max(j > 0 ? 2 + Pref[i][j - 1] : 0,
                              j + 1 < Adj[i].size() ? 2 + Suff[i][j + 1] : 0));
      DFS3(k, i);
    }
}
