#include <bits/stdc++.h>
using namespace std;
const int N = 123460;
int head[N], nxt[N * 2], to[N * 2], ne = 0;
int a[N];
void addedge(int a, int b) {
  nxt[ne] = head[a];
  to[ne] = b;
  head[a] = ne++;
}
void addbiedge(int a, int b) {
  addedge(a, b);
  addedge(b, a);
}
int sz[N];
void dfs(int idx, int p) {
  sz[idx] = a[idx];
  for (int i = head[idx]; ~i; i = nxt[i]) {
    if (to[i] == p) continue;
    dfs(to[i], idx);
    if (sz[to[i]]) {
      sz[idx] += sz[to[i]];
    } else
      to[i] = p;
  }
}
int root;
void getsz(int idx, int p) {
  sz[idx] = 0;
  for (int i = head[idx]; ~i; i = nxt[i]) {
    if (to[i] == p) continue;
    getsz(to[i], idx);
    sz[idx] += (2 + sz[to[i]]);
  }
}
int all;
multiset<int> st[N];
int getbest(int idx, int p) {
  if (sz[idx] == 0) {
    st[idx].insert(all);
    return all;
  }
  for (int i = head[idx]; ~i; i = nxt[i]) {
    if (to[i] == p) continue;
    int x = to[i];
    int v = getbest(x, idx);
    int y = v - (all - sz[x]);
    v = (y + 1 + all - (2 + sz[x]));
    st[idx].insert(v);
  }
  return *st[idx].begin();
}
int best, mn;
void getans(int idx, int p) {
  if (idx == root) {
    for (int i = head[idx]; ~i; i = nxt[i]) {
      if (to[i] == p) continue;
      getans(to[i], idx);
    }
    return;
  }
  int v = *st[idx].begin();
  int y = v - (all - sz[idx]);
  v = (y + 1 + all - (2 + sz[idx]));
  st[p].erase(st[p].find(v));
  if (st[p].size()) {
    int x = (*st[p].begin()) - 1;
    st[idx].insert(x);
    x = *st[idx].begin();
    if (x < mn) {
      mn = x;
      best = idx;
    } else if (x == mn) {
      best = min(best, idx);
    }
  } else {
    int x = sz[idx] + 1;
    st[idx].insert(x);
    x = *st[idx].begin();
    if (x < mn) {
      mn = x;
      best = idx;
    } else if (x == mn) {
      best = min(best, idx);
    }
  }
  st[p].insert(v);
  for (int i = head[idx]; ~i; i = nxt[i]) {
    if (to[i] == p) continue;
    getans(to[i], idx);
  }
}
int main() {
  memset(head, -1, sizeof head);
  int n, m;
  scanf("%d %d", &n, &m);
  int x, y;
  for (int i = 1; i < n; ++i) {
    scanf("%d %d", &x, &y);
    addbiedge(x, y);
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", &x);
    a[x] = 1;
    root = x;
  }
  dfs(root, 0);
  getsz(root, 0);
  all = sz[root];
  best = root;
  mn = getbest(root, 0);
  getans(root, 0);
  printf("%d\n%d", best, mn);
}
