#include <bits/stdc++.h>
using namespace std;
const int maxn = 130000;
vector<int> node[maxn];
int boom[maxn];
int n, m;
int vis[maxn];
int exist[maxn];
int cnt[maxn];
int dep[maxn];
void dfs(int u) {
  vis[u] = 1;
  if (boom[u]) exist[u] = 1;
  for (int i = 0; i < node[u].size(); i++) {
    int v = node[u][i];
    if (vis[v]) continue;
    dep[v] = dep[u] + 1;
    dfs(v);
    if (exist[v]) exist[u] = 1;
    if (exist[v]) cnt[u] += cnt[v] + 2;
  }
}
void dfs1(int u) {
  vis[u] = 1;
  for (int i = 0; i < node[u].size(); i++) {
    int v = node[u][i];
    if (vis[v]) continue;
    dep[v] = dep[u] + 1;
    dfs1(v);
  }
}
int findop() {
  int ans = 0;
  memset(vis, 0, sizeof(vis));
  memset(dep, 0, sizeof(dep));
  int op;
  for (int i = 1; i <= n; i++) {
    if (boom[i]) {
      op = i;
      break;
    }
  }
  dfs1(op);
  int maxdep = 0;
  for (int i = 1; i <= n; i++) {
    if (boom[i]) {
      if (maxdep < dep[i]) {
        op = i;
        maxdep = dep[i];
      }
    }
  }
  ans = op;
  memset(vis, 0, sizeof(vis));
  memset(dep, 0, sizeof(dep));
  dfs1(op);
  maxdep = 0;
  for (int i = 1; i <= n; i++) {
    if (boom[i]) {
      if (maxdep < dep[i]) {
        op = i;
        maxdep = dep[i];
      }
    }
  }
  return min(ans, op);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    node[u].push_back(v);
    node[v].push_back(u);
  }
  for (int i = 1; i <= m; i++) {
    int u;
    scanf("%d", &u);
    boom[u] = 1;
  }
  int op = findop();
  memset(vis, 0, sizeof(vis));
  memset(dep, 0, sizeof(dep));
  dep[op] = 1;
  dfs(op);
  int maxdep = 0;
  for (int i = 1; i <= n; i++)
    if (boom[i]) maxdep = max(maxdep, dep[i]);
  printf("%d\n", op);
  printf("%d\n", cnt[op] - maxdep + 1);
  return 0;
}
