#include <bits/stdc++.h>
using namespace std;
bool DBG = false;
template <class T>
T gcd(T t, T b) {
  while (b != 0) {
    T r = t % b;
    t = b;
    b = r;
  }
  return t;
}
template <class T>
T lcm(T t, T b) {
  return t / gcd(t, b) * b;
}
template <typename T, typename S>
std::ostream& operator<<(std::ostream& os, const std::pair<T, S>& p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const std::set<T>& s) {
  for (const auto& v : s) {
    cout << v << " ";
  }
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
  for (size_t i = 0; i < v.size(); ++i) {
    os << i << ": " << v[i] << endl;
  }
  return os;
}
template <typename T>
std::ostream& operator<<(std::ostream& os,
                         const std::vector<std::vector<T>>& vv) {
  for (size_t i = 0; i < vv.size(); ++i) {
    os << vv[i] << std::endl;
  }
  return os;
}
bool dfs(int v, int par, const vector<vector<int>>& t,
         const vector<bool>& marks, int dist, int* max_dist, int* min_ind,
         int* edges) {
  bool tree_is_marked = false;
  for (int u : t[v]) {
    if (u != par) {
      if (dfs(u, v, t, marks, dist + 1, max_dist, min_ind, edges)) {
        tree_is_marked = true;
        *edges += 1;
      }
    }
  }
  if (marks[v]) {
    tree_is_marked = true;
    if (dist > *max_dist || (dist == *max_dist && v < *min_ind)) {
      *max_dist = dist;
      *min_ind = v;
    }
  }
  return tree_is_marked;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> t(n);
  for (int i = 0; i < (int)(n - 1); ++i) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    t[x].push_back(y);
    t[y].push_back(x);
  }
  vector<bool> marks(n, false);
  int marked_v = -1;
  for (int i = 0; i < (int)(m); ++i) {
    int x;
    cin >> x;
    x--;
    marks[x] = true;
    marked_v = x;
  }
  int edges = 0;
  int first_max_dist = INT_MIN;
  int first_min_ind = INT_MAX;
  dfs(marked_v, -1, t, marks, 0, &first_max_dist, &first_min_ind, &edges);
  int second_max_dist = INT_MIN;
  int second_min_ind = INT_MAX;
  dfs(first_min_ind, -1, t, marks, 0, &second_max_dist, &second_min_ind,
      &edges);
  int res_ind = min(first_min_ind, second_min_ind) + 1;
  int res_len = edges - second_max_dist;
  cout << res_ind << endl << res_len << endl;
  return 0;
}
