#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > G;
vector<vector<int> > T;
int n, k;
vector<pair<int, int> > deepest;
vector<bool> attacks;
int edges = 0;
pair<int, int> diameter = {-1, -1};
bool worse(pair<int, int> a, pair<int, int> b) {
  if (a.first == b.first) return a.second > b.second;
  return a.first < b.first;
}
bool make_tree(int parent, int vertex) {
  pair<int, int> D = {-1, vertex};
  bool should_add = attacks[vertex];
  for (int x : G[vertex]) {
    if (x != parent && make_tree(vertex, x)) {
      edges++;
      T[vertex].push_back(x);
      should_add = true;
      if (worse(D, deepest[x])) D = deepest[x];
    }
  }
  deepest[vertex] = {D.first + 1, D.second};
  return should_add;
}
void descend(int vertex, pair<int, int> progress) {
  pair<int, int> D = progress;
  pair<int, int> D2 = {0, vertex};
  for (int x : T[vertex]) {
    pair<int, int> next = {deepest[x].first + 1, deepest[x].second};
    if (worse(D, next)) {
      D2 = D;
      D = next;
    } else if (worse(D2, next))
      D2 = next;
  }
  pair<int, int> dia = {D.first + D2.first, min(D.second, D2.second)};
  if (worse(diameter, dia)) diameter = dia;
  for (int x : T[vertex]) {
    if (deepest[x].second != D.second)
      descend(x, {D.first + 1, D.second});
    else
      descend(x, {D2.first + 1, D2.second});
  }
}
int main() {
  cin >> n >> k;
  G = vector<vector<int> >(n, vector<int>(0));
  T = vector<vector<int> >(n, vector<int>(0));
  deepest = vector<pair<int, int> >(n, {-1, -1});
  attacks = vector<bool>(n, false);
  for (int i = 0; i < n - 1; i++) {
    int a;
    int b;
    cin >> a >> b;
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  int a;
  for (int i = 0; i < k; i++) {
    cin >> a;
    a--;
    attacks[a] = true;
  }
  make_tree(-1, a);
  descend(a, {0, a});
  cout << diameter.second + 1 << endl << 2 * edges - diameter.first << endl;
}
