#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int inf = 0x3f3f3f3f;
int n, m, sum = 0, dep[130000];
vector<int> G[130000];
vector<int> Tree[130000];
int mark[130000];
bool dfs(int x, int fa) {
  bool flag = false, M = false;
  for (int i = 0; i < G[x].size(); i++) {
    if (G[x][i] == fa) continue;
    flag = dfs(G[x][i], x);
    if (flag) {
      Tree[x].push_back(G[x][i]);
      Tree[G[x][i]].push_back(x);
      sum += 2;
    }
    M |= flag;
  }
  return mark[x] |= M;
}
void dfs2(int x, int fa) {
  for (int i = 0; i < Tree[x].size(); i++) {
    int v = Tree[x][i];
    if (v == fa) continue;
    dep[v] = dep[x] + 1;
    dfs2(v, x);
  }
}
void solve(int t) {
  dfs(t, -1);
  dfs2(t, -1);
  int k = t;
  for (int i = 1; i <= n; i++) {
    if (dep[i] > dep[k]) k = i;
  }
  memset(dep, 0, sizeof(dep));
  dfs2(k, -1);
  for (int i = 1; i <= n; i++) {
    if (dep[i] > dep[t]) t = i;
  }
  printf("%d\n%d\n", min(t, k), sum - dep[t]);
}
int main() {
  int t = 0x3f3f3f3f, u, v;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d", &u);
    mark[u]++;
    t = min(u, t);
  }
  solve(t);
  return 0;
}
