#include <bits/stdc++.h>
using namespace std;
const int N = 123456 + 100;
vector<int> board[N];
int pa[N];
int res = 0;
pair<int, int> mx;
bool check[N];
bool dfs(int u, int parent, int cost) {
  bool k = 0;
  if (check[u]) {
    mx = max(mx, make_pair(cost, -u));
    k = 1;
  }
  for (int x = 0; x < board[u].size(); ++x) {
    int v = board[u][x];
    if (v == parent) continue;
    if (dfs(v, u, cost + 1)) {
      res++;
      k = 1;
    }
  }
  return k;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int x = 1; x < n; ++x) {
    int u, v;
    cin >> u >> v;
    board[u].push_back(v);
    board[v].push_back(u);
  }
  int u;
  for (int x = 0; x < m; ++x) {
    cin >> u;
    check[u] = 1;
  }
  mx = make_pair(0, -N);
  dfs(u, u, 0);
  res = 0;
  pair<int, int> x = mx;
  mx = make_pair(0, -N);
  dfs(-x.second, -x.second, 0);
  cout << -(max(x.second, mx.second)) << endl << 2 * res - mx.first << endl;
}
