#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 2;
std::vector<int> vtr[M];
bool req[M];
int ans = -1, ind = -1;
int no = 0;
pair<int, int> DFS(int x, int p) {
  pair<int, int> a = make_pair(-1, -1);
  pair<int, int> b = make_pair(-1, -1);
  pair<int, int> c;
  for (int i = 0; i < vtr[x].size(); i++) {
    int u = vtr[x][i];
    if (u != p) {
      c = DFS(u, x);
      if (c.first > a.first || c.first == a.first && c.second < a.second) {
        b = a;
        a = c;
      } else {
        if (c.first > b.first || c.first == b.first && c.second < b.second)
          b = c;
      }
    }
  }
  if (a.first != -1) {
    if (b.first != -1) {
      if (a.first + b.first > ans) {
        ans = a.first + b.first;
        if (a.second > b.second)
          ind = b.second;
        else
          ind = a.second;
      }
      if (a.first + b.first == ans) {
        if (ind > a.second) ind = a.second;
        if (ind > b.second) ind = b.second;
      }
    } else {
      if (a.first > ans) {
        ans = a.first;
        if (a.second > x)
          ind = x;
        else
          ind = a.second;
      }
      if (a.first == ans) {
        if (ind > a.second) ind = a.second;
        if (ind > x) ind = x;
      }
    }
  }
  if (a.first != -1) {
    no++;
    return make_pair(a.first + 1, a.second);
  }
  if (req[x]) {
    no++;
    if (ans < (int)1) {
      ans = 1;
      ind = x;
    }
    if (ans == (int)1) {
      if (ind > x) ind = x;
    }
    return make_pair(1, x);
  }
  return a;
}
int main() {
  int n, m, i, u, v;
  cin >> n >> m;
  for (i = 1; i < n; i++) {
    cin >> u >> v;
    vtr[u].push_back(v);
    vtr[v].push_back(u);
  }
  int root;
  for (i = 1; i <= m; i++) {
    cin >> root;
    req[root] = 1;
  }
  DFS(root, 0);
  if (no == 1) {
    cout << root << endl << 0 << endl;
    return 0;
  }
  cout << ind << endl << 2 * (no - 1) - ans << endl;
  return 0;
}
