#include <bits/stdc++.h>
using namespace std;
const int N = 200000;
int n, m;
vector<int> v[N];
int a[N];
void go(int x, int fr, int dis, int &y, int &dy) {
  if (a[x])
    if (dy < dis || (dy == dis && y > x)) y = x, dy = dis;
  for (int i = 0; i < v[x].size(); i++)
    if (v[x][i] != fr) go(v[x][i], x, dis + 1, y, dy);
}
int ans = 0;
int go2(int x, int fr) {
  int R = a[x];
  for (int i = 0; i < v[x].size(); i++)
    if (v[x][i] != fr) {
      int RR = go2(v[x][i], x);
      ans += 2 * (RR > 0 && RR < m);
      R += RR;
    }
  return R;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  int x;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &x);
    a[x] = 1;
  }
  int y = N + 1;
  int dy = -1;
  go(x, x, 0, y, dy);
  int z = N + 1;
  int dz = -1;
  go(y, y, 0, z, dz);
  cout << min(y, z) << endl;
  go2(1, 1);
  cout << ans - dz << endl;
  return 0;
}
