#include <bits/stdc++.h>
using namespace std;
vector<int> edges[200000];
bool flag[200000];
int att[200000], V, maxd, minv1, minv2;
bool dfs1(int u, int fa) {
  int i;
  bool f = flag[u];
  for (i = 0; i < (int)edges[u].size(); i++)
    if (edges[u][i] != fa) f |= dfs1(edges[u][i], u);
  if (f) ++V;
  return flag[u] = f;
}
void dfs2(int u, int fa, int nowd) {
  if (maxd < nowd) {
    maxd = nowd;
    minv1 = u;
  } else if (maxd == nowd)
    minv1 = min(minv1, u);
  for (int i = 0; i < (int)edges[u].size(); i++) {
    int v = edges[u][i];
    if (v != fa && flag[v]) dfs2(v, u, nowd + 1);
  }
}
int main() {
  int n, m, i;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    flag[i] = false;
    edges[i].clear();
  }
  for (i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  for (i = 0; i < m; i++) {
    scanf("%d", &att[i]);
    flag[att[i]] = true;
  }
  V = 0;
  dfs1(att[0], -1);
  maxd = -1;
  dfs2(att[0], -1, 0);
  minv2 = minv1;
  maxd = -1;
  dfs2(minv2, -1, 0);
  printf("%d\n%d", min(minv1, minv2), 2 * (V - 1) - maxd);
  return 0;
}
