#include <bits/stdc++.h>
using namespace std;
const int N = 223457;
int s2[N], vis[N], ans, vv[N], ansi;
vector<int> g[N];
struct node {
  int id, k;
  node() {}
  node(int id, int k) : id(id), k(k) {}
};
struct cmp {
  bool operator()(const node &a, const node &b) const {
    if (a.k == b.k) return a.id > b.id;
    return a.k > b.k;
  }
};
multiset<node, cmp> s1[N];
void dfs(int u, int fa) {
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == fa) continue;
    dfs(v, u);
    if (vis[v] || vv[v]) {
      s2[u] += s2[v] + 2;
      vis[u]++;
    }
  }
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == fa) continue;
    if (vis[v] || vv[v]) {
      if (vis[v])
        s1[u].insert(node(v, s1[v].begin()->k + 1));
      else
        s1[u].insert(node(v, 1));
    }
  }
}
void work(int u, int fa) {
  int t = s1[u].begin()->k;
  if (ans >= s2[u] - t) {
    if (ans == s2[u] - t)
      ansi = min(ansi, u);
    else
      ansi = u;
    ans = s2[u] - t;
  }
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == fa) continue;
    if (vis[v] || vv[v]) {
      vis[u]--;
      if (vis[v])
        s1[u].erase(node(v, s1[v].begin()->k + 1));
      else
        s1[u].erase(node(v, 1));
      s2[u] -= (s2[v] + 2);
    }
    if (vv[u] || vis[u]) {
      vis[v]++;
      s2[v] += s2[u] + 2;
      if (vis[u])
        s1[v].insert(node(u, s1[u].begin()->k + 1));
      else
        s1[v].insert(node(u, 1));
    }
    work(v, u);
    if (vv[u] || vis[u]) {
      if (vis[u])
        s1[v].erase(node(u, s1[u].begin()->k + 1));
      else
        s1[v].erase(node(u, 1));
      vis[v]--;
      s2[v] -= (s2[u] + 2);
    }
    if (vv[v] || vis[v]) {
      vis[u]++;
      s2[u] += s2[v] + 2;
      if (vis[v])
        s1[u].insert(node(v, s1[v].begin()->k + 1));
      else
        s1[u].insert(node(v, 1));
    }
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    vv[x] = 1;
  }
  dfs(1, 0);
  ans = 123456789;
  work(1, 0);
  printf("%d\n%d\n", ansi, ans);
}
