#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void amin(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
inline void amax(T &a, const T &b) {
  if (a < b) a = b;
}
int N, M;
vector<int> G[200011];
int A[200011];
int root;
int par[200011];
vector<int> dist(int s) {
  vector<int> len(N, -1);
  len[s] = 0;
  stack<int> X;
  X.push(s);
  while (!X.empty()) {
    int v = X.top();
    X.pop();
    for (__typeof((G[v]).begin()) e = (G[v]).begin(), e_end = (G[v]).end();
         e != e_end; ++e)
      if (len[*e] == -1 && A[*e]) {
        len[*e] = len[v] + 1;
        X.push(*e);
      }
  }
  return len;
}
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 0, i_len = (N - 1); i < i_len; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 0, i_len = (M); i < i_len; ++i) {
    int a;
    scanf("%d", &a);
    a--;
    root = a;
    A[a] = 1;
  }
  vector<int> ord;
  ord.reserve(N);
  ord.push_back(root);
  par[root] = root;
  for (int i = 0, i_len = (N); i < i_len; ++i) {
    int v = ord[i];
    for (__typeof((G[v]).begin()) e = (G[v]).begin(), e_end = (G[v]).end();
         e != e_end; ++e)
      if (*e != par[v]) {
        par[*e] = v;
        ord.push_back(*e);
      }
  }
  for (int i = 0, i_len = (N); i < i_len; ++i) {
    int v = ord[N - 1 - i];
    for (__typeof((G[v]).begin()) e = (G[v]).begin(), e_end = (G[v]).end();
         e != e_end; ++e)
      if (*e != par[v]) {
        if (A[*e]) {
          A[v] |= 2;
          break;
        }
      }
  }
  int k = root;
  {
    vector<int> len = dist(root);
    for (int i = 0, i_len = (N); i < i_len; ++i) {
      if (len[i] > len[k]) k = i;
      if (len[i] == len[k] && i < k) k = i;
    }
  }
  int k2 = k;
  vector<int> len = dist(k);
  for (int i = 0, i_len = (N); i < i_len; ++i) {
    if (len[i] > len[k2]) k2 = i;
    if (len[i] == len[k2] && i < k2) k2 = i;
  }
  int cnt = 0;
  for (int i = 0, i_len = (N); i < i_len; ++i)
    if (A[i]) cnt++;
  printf("%d\n%d\n", min(k, k2) + 1, cnt * 2 - 2 - len[k2]);
  return 0;
}
