#include <bits/stdc++.h>
using namespace std;
bool dan[123460];
vector<int> MAP[123460];
int n, m;
pair<int, int> ans;
pair<int, int> dp[123460];
int cnt;
bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
  if (a.first != b.first)
    return a.first < b.first;
  else
    return a.second > b.second;
}
void zhijing(int u, int f) {
  dp[u].second = u;
  int sz = MAP[u].size();
  for (int i = 0; i < sz; i++) {
    int v = MAP[u][i];
    if (v == f) continue;
    zhijing(v, u);
    cnt++;
    pair<int, int> temp = make_pair(dp[u].first + dp[v].first + 1,
                                    min(dp[u].second, dp[v].second));
    ans = max(ans, temp, cmp);
    temp = make_pair(dp[v].first + 1, dp[v].second);
    dp[u] = max(dp[u], temp, cmp);
  }
}
bool suoxiao(int u, int f) {
  int sz = MAP[u].size();
  bool ok = false;
  for (int i = 0; i < sz; i++) {
    int v = MAP[u][i];
    if (v == f) continue;
    if (suoxiao(v, u))
      ok = true;
    else {
      MAP[u].erase(MAP[u].begin() + i);
      i--;
      sz--;
    }
  }
  return (ok || dan[u]);
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    MAP[a].push_back(b);
    MAP[b].push_back(a);
  }
  int rt;
  for (int i = 0; i < m; i++) {
    int temp;
    scanf("%d", &temp);
    dan[temp] = true;
    rt = temp;
  }
  suoxiao(rt, -1);
  ans.second = rt;
  zhijing(rt, -1);
  printf("%d\n%d\n", ans.second, 2 * cnt - ans.first);
  return 0;
}
