#include <bits/stdc++.h>
using namespace std;
template <class X, class Y>
void minimize(X &x, const Y &y) {
  if (x > y) x = y;
}
template <class X, class Y>
void maximize(X &x, const Y &y) {
  if (x < y) x = y;
}
const int INF = (int)1e9 + 7;
vector<int> adj[200200];
int farIn[200200], farOut[200200], numChs[200200], numEdge[200200];
bool chs[200200];
int n, m;
void loadTree(void) {
  scanf("%d%d", &n, &m);
  for (int love = 0, _n = (n - 1); love < _n; love = love + 1) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int love = 0, _n = (m); love < _n; love = love + 1) {
    int x;
    scanf("%d", &x);
    chs[x] = true;
  }
}
void firstDFS(int u, int p) {
  if (chs[u]) {
    farIn[u] = 0;
    numChs[u] = 1;
  }
  for (__typeof((adj[u]).begin()) it = (adj[u]).begin(); it != (adj[u]).end();
       it++)
    if (*it != p) {
      int v = *it;
      firstDFS(v, u);
      maximize(farIn[u], farIn[v] + 1);
      numChs[u] += numChs[v];
    }
}
void secondDFS(int u, int p) {
  pair<int, int> bestChild(-INF, -INF);
  for (__typeof((adj[u]).begin()) it = (adj[u]).begin(); it != (adj[u]).end();
       it++)
    if (*it != p) {
      if (farIn[*it] > bestChild.first) {
        bestChild.second = bestChild.first;
        bestChild.first = farIn[*it];
      } else
        maximize(bestChild.second, farIn[*it]);
    }
  for (__typeof((adj[u]).begin()) it = (adj[u]).begin(); it != (adj[u]).end();
       it++)
    if (*it != p) {
      int v = *it;
      int oldState = numChs[v] > 0;
      int newState = numChs[v] < m;
      numEdge[v] = numEdge[u] - oldState + newState;
      maximize(farOut[v], farOut[u] + 1);
      if (chs[u]) maximize(farOut[v], 1);
      maximize(farOut[v], (farIn[v] == bestChild.first ? bestChild.second
                                                       : bestChild.first) +
                              2);
      secondDFS(v, u);
    }
}
int chooseNode(int u) { return (numEdge[u] * 2 - max(farIn[u], farOut[u])); }
void process(void) {
  memset(farIn, -0x3f, sizeof farIn);
  memset(farOut, -0x3f, sizeof farOut);
  firstDFS(1, -1);
  for (int i = (2), _b = (n); i <= _b; i = i + 1)
    if (numChs[i] > 0) numEdge[1]++;
  secondDFS(1, -1);
  int best = 1;
  for (int i = (1), _b = (n); i <= _b; i = i + 1)
    if (chooseNode(i) < chooseNode(best)) best = i;
  cout << best << endl << chooseNode(best) << endl;
}
int main(void) {
  loadTree();
  process();
  return 0;
}
