#include <bits/stdc++.h>
using namespace std;
int N;
int arr[200010];
vector<int> AdjList[200010];
int dp1[200010], dp2[200010];
int save[200010][3];
int mark[200010];
int subtree[200010];
int M;
void dfs(int node, int dad) {
  for (int i = 0; i < AdjList[node].size(); i++) {
    int v = AdjList[node][i];
    if (v != dad) {
      dfs(v, node);
      subtree[node] += subtree[v];
      if (subtree[v] == 0) continue;
      dp1[node] += (dp1[v] + 2);
      if (save[node][0] < save[v][0] + 1) {
        save[node][1] = save[node][0];
        save[node][0] = save[v][0] + 1;
      } else if (save[node][1] < save[v][0] + 1) {
        save[node][1] = save[v][0] + 1;
      }
    }
  }
  if (mark[node] == 1) subtree[node]++;
}
void dfs1(int node, int dad) {
  if (node != 1 and M - subtree[node] > 0) {
    dp2[node] = dp2[dad] + 2 + (dp1[dad] - dp1[node] - 2);
    if (subtree[node] == 0) dp2[node] += 2;
    if (save[node][0] + 1 == save[dad][0]) {
      save[node][2] = max(save[dad][1] + 1, save[dad][2] + 1);
    } else {
      save[node][2] = max(save[dad][0] + 1, save[dad][2] + 1);
    }
  }
  for (int i = 0; i < AdjList[node].size(); i++) {
    int v = AdjList[node][i];
    if (v != dad) {
      dfs1(v, node);
    }
  }
}
inline void ReadInput(void) {
  scanf("%d", &N);
  scanf("%d", &M);
  for (int i = 1; i < N; i++) {
    int a, b;
    scanf("%d", &a);
    scanf("%d", &b);
    AdjList[a].push_back(b);
    AdjList[b].push_back(a);
  }
  for (int i = 1; i <= M; i++) {
    int a;
    scanf("%d", &a);
    mark[a] = 1;
  }
}
inline void solve(void) {
  dfs(1, 1);
  dfs1(1, 1);
  int idx = -1, ans = 1000000007;
  for (int i = 1; i <= N; i++) {
    int val = dp1[i] + dp2[i] - max(save[i][0], save[i][2]);
    if (ans > val) {
      ans = val;
      idx = i;
    }
  }
  cout << idx << endl << ans << endl;
}
inline void Refresh(void) {}
int main() {
  ReadInput();
  solve();
  return 0;
}
