#include <bits/stdc++.h>
using namespace std;
struct node {
  int to, v;
};
vector<int> A[130010];
vector<int> ans1;
int B[130010], q = 0;
int fa[130010], d[130010];
int e = 10000000, r = 10000000;
bool mark[130010], mark1[130010];
void dfs(int x, int sum) {
  int i;
  mark[x] = 0;
  if (sum >= q) {
    if (sum == q)
      ans1.push_back(x);
    else {
      ans1.clear();
      ans1.push_back(x);
    }
    q = sum;
  }
  for (i = 0; i < A[x].size(); i++) {
    if (!mark[A[x][i]]) continue;
    dfs(A[x][i], sum + 1);
  }
}
void dfs2(int x, int sum) {
  int i;
  mark[x] = 0;
  if (sum >= q) {
    if (sum > q)
      r = x;
    else
      r = min(x, r);
    q = sum;
  }
  for (i = 0; i < A[x].size(); i++) {
    if (!mark[A[x][i]]) continue;
    dfs2(A[x][i], sum + 1);
  }
}
void build(int x, int y) {
  int i;
  mark[x] = 1;
  d[x] = y;
  for (i = 0; i < A[x].size(); i++)
    if (!mark[A[x][i]]) {
      build(A[x][i], y + 1);
      fa[A[x][i]] = x;
    }
}
int dfs1(int x, int y) {
  mark[x] = 1;
  mark[y] = 1;
  if (x == y) return x;
  if (d[x] == d[y])
    return dfs1(fa[x], fa[y]);
  else if (d[x] > d[y])
    return dfs1(fa[x], y);
  else
    return dfs1(x, fa[y]);
}
int main() {
  memset(mark, 0, sizeof(mark));
  int n, m, i, j, x, y, z;
  scanf("%d%d", &n, &m);
  for (i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    A[y].push_back(x);
    A[x].push_back(y);
  }
  build(1, 1);
  memset(mark, 0, sizeof(mark));
  scanf("%d", &x);
  B[1] = x;
  for (i = 2; i <= m; i++) {
    scanf("%d", &B[i]);
    if (mark[B[i]]) continue;
    x = dfs1(x, B[i]);
  }
  if (m == 1) {
    int t = 10000000;
    for (i = 1; i <= m; i++) t = min(t, B[i]);
    printf("%d\n0\n", t);
    return 0;
  }
  memcpy(mark1, mark, sizeof(mark1));
  int ans = -1;
  for (i = 1; i <= n; i++)
    if (mark[i]) ans++;
  ans *= 2;
  ans1.clear();
  q = 0;
  dfs(B[1], 0);
  memcpy(mark, mark1, sizeof(mark));
  for (i = 0; i < ans1.size(); i++) e = min(ans1[i], e);
  q = 0;
  dfs2(ans1[0], 0);
  e = min(e, r);
  printf("%d\n%d\n", e, ans - q);
  return 0;
}
