#include <bits/stdc++.h>
using namespace std;
long long n, m, from, to, x, rem_nodes = 0, mn = 1e9, dia = 0;
vector<pair<long long, long long>> del_nodes;
map<long long, long long> special, sz, len;
map<long long, set<long long>> adj;
vector<long long> sp;
void dfs(long long node, long long parent) {
  for (auto child : adj[node]) {
    if (child == parent) continue;
    dfs(child, node);
  }
  if (sz[node] == 1 && !special[node]) {
    del_nodes.push_back({node, parent});
    sz[parent] -= 1;
  }
}
void bfs(long long node) {
  queue<long long> q;
  q.push(node);
  len[node] = 1;
  long long dep = 2, sz = 1, cur;
  for (; !q.empty(); dep++, sz = q.size()) {
    dia = max(dia, dep);
    while (sz--) {
      cur = q.front();
      q.pop();
      for (auto u : adj[cur]) {
        if (len.find(u) == len.end()) {
          len[u] = dep;
          q.push(u);
        }
      }
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    cin >> from >> to;
    adj[from].insert(to);
    sz[from] += 1;
    adj[to].insert(from);
    sz[to] += 1;
  }
  if (m == 1) {
    cin >> x;
    return cout << x << endl << 0, 0;
  }
  for (int i = 1; i <= m; i++) {
    cin >> x;
    special[x] = 1;
    sp.push_back(x);
  }
  dfs(x, -1);
  for (int i = 0; i < del_nodes.size(); i++) {
    long long u = del_nodes[i].first;
    long long v = del_nodes[i].second;
    adj[u].erase(v);
    adj[v].erase(u);
  }
  bfs(x);
  for (int i = 1; i <= n; i++) {
    if (len[i] == dia - 1) {
      mn = min(mn, (long long)i);
      x = i;
    }
  }
  len.clear();
  bfs(x);
  for (int i = 1; i <= n; i++) {
    if (len[i] == dia - 1) mn = min(mn, (long long)i);
    if (adj[i].size() > 0) rem_nodes++;
  }
  cout << mn << endl << rem_nodes + (rem_nodes - dia) << endl;
  return 0;
}
