#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
long long a[N];
pair<int, int> p;
int mark[N];
int edges = 0;
vector<int> v[N];
int dfs(int s, int P, int dis) {
  if (mark[s]) p = max(p, {dis, -s});
  int ret = mark[s];
  for (auto i : v[s]) {
    if (i == P) continue;
    int yo = dfs(i, s, dis + 1);
    if (yo) ret = 1, edges++;
  }
  return ret;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int x, y;
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  int root;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    mark[x] = 1;
    root = x;
  }
  p = {0, INT_MIN};
  dfs(root, 0, 0);
  pair<int, int> x = p;
  p = {0, INT_MIN};
  edges = 0;
  dfs(-x.second, 0, 0);
  cout << -max(x.second, p.second) << "\n" << 2 * edges - p.first;
  return 0;
}
