#include <bits/stdc++.h>
const double eps = 1e-10;
using namespace std;
int subsize[1234777];
vector<int> gr[1234777];
int nodes, n, m, was[1234777], mx, len, root, Num;
int k1, k2;
void dfs(int v, bool &w, int p) {
  bool flag = was[v];
  for (int i = 0; i < gr[v].size(); i++) {
    int to = gr[v][i];
    if (to == p) continue;
    bool c;
    dfs(to, c, v);
    if (c) {
      Num++;
    }
    flag |= c;
  }
  w = flag;
}
void man_dfs(int v, int p, int h = 0) {
  if (h > k1 && was[v]) {
    k1 = h, k2 = v;
  }
  if (h == k1 && v < k2 && was[v]) {
    k1 = h, k2 = v;
  }
  for (int i = 0; i < (int)gr[v].size(); i++) {
    int to = gr[v][i];
    if (to != p) {
      man_dfs(to, v, h + 1);
    }
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    gr[a].push_back(b);
    gr[b].push_back(a);
  }
  int x = 0;
  for (int i = 0; i < m; i++) {
    cin >> root;
    was[root] = 1;
    x = root;
  }
  bool bol;
  k1 = 0, k2 = 27;
  dfs(x, bol, x);
  Num = Num + Num;
  man_dfs(x, x);
  x = k2;
  k1 = 0, k2 = 27;
  man_dfs(x, x);
  k2 = min(k2, x);
  printf("%d\n%d", k2, Num - k1);
  return 0;
}
