#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
struct edge {
  int from, to, next;
} e[maxn];
int head[maxn], tot;
void add(int a, int b) {
  e[tot].from = a, e[tot].to = b, e[tot].next = head[a], head[a] = tot++;
}
int v[maxn], sum[maxn], sz[maxn];
void dfs(int rt, int fa) {
  sz[rt] = 0;
  sum[rt] = 0;
  for (int i = head[rt]; i != -1; i = e[i].next) {
    int to = e[i].to;
    if (to == fa) continue;
    dfs(to, rt);
    sz[rt] += sz[to];
  }
  if (sz[rt])
    sz[rt]++;
  else if (v[rt])
    sz[rt] = 1;
}
int dep[maxn], ids[maxn];
int maxv, ansid;
int k;
int dfs2(int rt, int fa) {
  int dep1 = 0, dep2 = 0;
  int id1, id2;
  for (int i = head[rt]; i != -1; i = e[i].next) {
    int to = e[i].to;
    if (to == fa) continue;
    if (!sz[to]) continue;
    dfs2(to, rt);
    if (dep1 < dep[to] + 1 || dep1 == dep[to] + 1 && id1 > ids[to]) {
      swap(dep1, dep2);
      swap(id1, id2);
      dep1 = dep[to] + 1;
      id1 = ids[to];
    } else if (dep2 < dep[to] + 1 || dep2 == dep[to] + 1 && id2 > ids[to]) {
      dep2 = dep[to] + 1;
      id2 = ids[to];
    }
  }
  if (dep1 && maxv <= dep1 + dep2) {
    if (maxv == dep1 + dep2) {
      if (dep2)
        ansid = min(ansid, min(id1, id2));
      else
        ansid = min(ansid, min(rt, id1));
    } else {
      maxv = dep1 + dep2;
      if (dep2)
        ansid = min(id1, id2);
      else
        ansid = min(rt, id1);
    }
  }
  if (dep1) return dep[rt] = dep1, ids[rt] = id1;
  if (v[rt]) return dep[rt] = 0, ids[rt] = rt;
  return dep[rt] = 0;
}
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    memset(head, -1, sizeof(head));
    tot = 0;
    for (int i = 1; i < n; i++) {
      int a, b;
      scanf("%d%d", &a, &b);
      add(a, b);
      add(b, a);
    }
    memset(v, 0, sizeof(v));
    for (int i = 1; i <= m; i++) {
      scanf("%d", &k);
      v[k] = 1;
    }
    dfs(k, -1);
    int ans = sz[k] - 1;
    ans = ans << 1;
    ansid = k;
    maxv = 0;
    dfs2(k, -1);
    printf("%d\n%d\n", ansid, ans - maxv);
  }
}
