#include <bits/stdc++.h>
using namespace std;
const int maxn = 123457;
bool vis[maxn], good[maxn];
int n, m, x, y, costin[maxn], costout[maxn], din[maxn], dout[maxn];
vector<int> vs[maxn], G[maxn], specials;
void compress(int v) {
  vis[v] = true;
  for (auto& e : vs[v]) {
    if (not vis[e]) {
      compress(e);
      good[v] |= good[e];
      if (good[e]) {
        G[v].push_back(e);
        G[e].push_back(v);
      }
    }
  }
}
void dfsin(int v) {
  vis[v] = true;
  for (auto& e : G[v]) {
    if (not vis[e]) {
      dfsin(e);
      costin[v] += 1 + costin[e];
      din[v] = max(din[v], 1 + din[e]);
    }
  }
}
void dfsout(int v) {
  vis[v] = true;
  vector<pair<int, int>> depths;
  for (auto& e : G[v])
    if (not vis[e]) depths.push_back({din[e] + 1, e});
  sort(depths.begin(), depths.end(), greater<pair<int, int>>());
  for (auto& e : G[v]) {
    if (not vis[e]) {
      dout[e] = dout[v] + 1;
      for (auto& p : depths) {
        if (not vis[e] and p.second != e) {
          dout[e] = max(dout[e], p.first + 1);
          break;
        }
      }
    }
  }
  depths.clear();
  for (auto& e : G[v]) {
    if (not vis[e]) {
      costout[e] = costout[v] + costin[v] - costin[e];
      dfsout(e);
    }
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &x, &y);
    vs[--x].push_back(--y);
    vs[y].push_back(x);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &x);
    good[--x] = true;
    specials.push_back(x);
  }
  compress(specials.front());
  memset(vis, 0, sizeof(vis));
  dfsin(specials.front());
  memset(vis, 0, sizeof(vis));
  dfsout(specials.front());
  int mn = 1e9, curbest = -1, aux;
  for (int s = 0; s < n; s++) {
    if (good[s]) {
      aux = (2 * costin[s]) + (2 * costout[s]) - max(din[s], dout[s]);
      if (aux < mn) curbest = s, mn = aux;
    }
  }
  printf("%d\n%d\n", curbest + 1, mn);
  return 0;
}
