#include <bits/stdc++.h>
using namespace std;
struct Node {
  int v, cnt;
  Node() {}
  Node(int a, int b) {
    v = a;
    cnt = b;
  }
};
const int mx = 123459;
vector<Node> vec[mx];
vector<int> abc[mx];
int fire[mx];
int dfs1(int u, int from) {
  int i, j, v, l = vec[u].size();
  int ans = fire[u];
  for (i = 0; i < l; i++) {
    v = vec[u][i].v;
    if (v == from) continue;
    vec[u][i].cnt = dfs1(v, u);
    ans += vec[u][i].cnt;
  }
  return ans;
}
void findabc(int u, int from) {
  int i, j, k, v, l = vec[u].size();
  for (i = 0; i < l; i++) {
    v = vec[u][i].v;
    if (vec[u][i].cnt == 0) continue;
    if (v == from) continue;
    abc[u].push_back(v);
    abc[v].push_back(u);
    findabc(v, u);
  }
}
pair<int, int> dfs(int u, int from) {
  int i, v, l = abc[u].size();
  pair<int, int> a, b;
  int mx = 0;
  a = make_pair(u, 0);
  for (i = 0; i < l; i++) {
    v = abc[u][i];
    if (v == from) continue;
    b = dfs(v, u);
    if (b.second > mx) {
      mx = b.second;
      a = b;
    }
    if (b.second == mx && b.first < a.first) {
      a = b;
    }
  }
  a.second++;
  return a;
}
int main() {
  int i, j, k, n, m, u, v;
  scanf("%d %d", &n, &m);
  for (i = 1; i < n; i++) {
    scanf("%d %d", &u, &v);
    vec[u].push_back(Node(v, 0));
    vec[v].push_back(Node(u, 0));
  }
  int idx = mx;
  for (i = 0; i < m; i++) {
    scanf("%d", &u);
    idx = min(idx, u);
    fire[u]++;
  }
  v = dfs1(idx, -1);
  findabc(idx, -1);
  int ans = 0;
  for (i = 1; i <= n; i++) {
    k = abc[i].size();
    sort(abc[i].begin(), abc[i].end());
    ans += k;
  }
  pair<int, int> a = dfs(idx, -1);
  pair<int, int> b = dfs(a.first, -1);
  b.second--;
  idx = min(a.first, b.first);
  ans -= b.second;
  printf("%d\n%d\n", idx, ans);
  return 0;
}
