#include <bits/stdc++.h>
using namespace std;
struct Node {
  bool attacked;
  int depth, index, last_visit;
  vector<int> adj;
  bool operator<(const Node& rhs) const {
    if (attacked != rhs.attacked) {
      return rhs.attacked;
    }
    if (depth == rhs.depth) {
      return index > rhs.index;
    }
    return depth < rhs.depth;
  }
};
int deepest_node(vector<Node>& tree, int root, int depth, int parent) {
  tree[root].depth = depth;
  int result = root;
  for (unsigned int i = 0; i < tree[root].adj.size(); i++) {
    int index = tree[root].adj[i];
    if (index != parent) {
      int new_result = deepest_node(tree, index, depth + 1, root);
      if (tree[result] < tree[new_result]) {
        result = new_result;
      }
    }
  }
  return result;
}
void dfs(vector<Node>& tree, int root, int& last, int& time) {
  tree[root].last_visit = time;
  if (tree[root].attacked) {
    last = time;
  }
  for (unsigned int i = 0; i < tree[root].adj.size(); i++) {
    int index = tree[root].adj[i];
    if (tree[index].last_visit == -1) {
      time++;
      dfs(tree, index, last, time);
      time++;
      if (last <= tree[root].last_visit) {
        time = tree[root].last_visit;
      }
      tree[root].last_visit = time;
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  Node node = {false, -1, n - 1, -1, vector<int>()};
  vector<Node> tree(n, node);
  for (int i = 0; i < n - 1; i++) {
    tree[i].index = i;
    int u, v;
    cin >> u >> v;
    tree[u - 1].adj.push_back(v - 1);
    tree[v - 1].adj.push_back(u - 1);
  }
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    tree[a - 1].attacked = true;
  }
  int first = deepest_node(tree, 0, 0, -1),
      second = deepest_node(tree, first, 0, -1), max_depth = tree[second].depth,
      root = min(first, second);
  int last = -1, time = 0;
  dfs(tree, root, last, time);
  cout << root + 1 << endl << time - max_depth << endl;
  return 0;
}
