#include <bits/stdc++.h>
using namespace std;
const long long Maxn = 1e6 + 7;
const long long Max = 1e3 + 7;
const long long Inf = 1e9 + 7;
vector<int> V[Maxn];
int atk[Maxn], h[Maxn], dis, pos, e;
void dfs(int u, int par = 0) {
  for (int i = 0; i < V[u].size(); i++) {
    int v = V[u][i];
    if (v != par) {
      h[v] = h[u] + 1;
      dfs(v, u);
      if (atk[v] && dis <= h[v]) pos = v, dis = h[v];
      atk[u] |= atk[v];
    }
  }
  if (atk[u]) e++;
}
void DFS(int u, int par = 0) {
  for (int i = 0; i < V[u].size(); i++) {
    int v = V[u][i];
    if (v != par) {
      h[v] = h[u] + 1;
      if (atk[v]) dis = max(dis, h[v]);
      DFS(v, u);
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    V[u].push_back(v);
    V[v].push_back(u);
  }
  int x;
  for (int i = 0; i < m; i++) {
    cin >> x;
    atk[x] = 1;
  }
  pos = x;
  dfs(x);
  h[pos] = 0;
  dfs(pos);
  h[pos] = 0;
  int ans = 0;
  for (int i = 1; i <= n; i++)
    if (atk[i])
      if (h[i] == 0 || h[i] == dis) {
        ans = i;
        break;
      }
  DFS(pos);
  for (int i = 1; i <= n; i++)
    if (atk[i])
      if (h[i] == 0 || h[i] == dis) {
        ans = min(i, ans);
        break;
      }
  cout << ans << endl << e - 2 - dis << endl;
}
