#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, m;
set<int> g[N];
int deg[N], sub[N];
int dis1[N], dis2[N], pr[N];
void dfs(int node, int pre, int dis[], int d, int &f, int &md) {
  pr[node] = pre;
  dis[node] = d;
  if (dis[node] > md) {
    md = dis[node];
    f = node;
  }
  for (int i : g[node]) {
    if (i == pre) continue;
    dfs(i, node, dis, d + 1, f, md);
  }
}
int dis[N], vis[N];
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n - 1; i++) {
    int a, b;
    cin >> a >> b;
    g[a].insert(b);
    g[b].insert(a);
    deg[a]++;
    deg[b]++;
  }
  int root;
  for (int i = 1; i <= m; i++) {
    int c;
    cin >> c;
    sub[c] = 1;
    root = c;
  }
  multiset<pair<int, int>> st;
  for (int i = 1; i <= n; i++) st.insert(make_pair(deg[i], i));
  while (!st.empty()) {
    pair<int, int> P = *st.begin();
    if (P.first > 1) break;
    st.erase(st.begin());
    if (P.first == 0) continue;
    if (sub[P.second]) continue;
    int node1 = P.second;
    int node2 = *g[P.second].begin();
    st.erase(make_pair(deg[node2], node2));
    g[node2].erase(node1);
    g[node1].erase(node2);
    deg[node1]--;
    deg[node2]--;
    st.insert(make_pair(deg[node1], node1));
    st.insert(make_pair(deg[node2], node2));
  }
  int f1, m1 = -1;
  int f2, m2 = -1;
  dfs(root, 0, dis1, 0, f1, m1);
  dfs(f1, 0, dis2, 0, f2, m2);
  int node = f2;
  vector<int> nodes;
  while (node != 0) {
    nodes.push_back(node);
    node = pr[node];
  }
  int total = 0;
  for (int i = 1; i <= n; i++) {
    total = total + g[i].size();
  }
  int diameter = nodes.size() - 1;
  int sz = nodes.size();
  queue<int> Q;
  if (nodes.size() % 2 == 1) {
    Q.push(nodes[sz / 2]);
    dis[nodes[sz / 2]] = 0;
    vis[nodes[sz / 2]] = 1;
  } else {
    Q.push(nodes[sz / 2]);
    Q.push(nodes[sz / 2 - 1]);
    dis[nodes[sz / 2]] = 0;
    vis[nodes[sz / 2]] = 1;
    dis[nodes[sz / 2 - 1]] = 0;
    vis[nodes[sz / 2 - 1]] = 1;
  }
  set<int> corners;
  while (!Q.empty()) {
    int P = Q.front();
    Q.pop();
    if (dis[P] == diameter / 2) corners.insert(P);
    for (int i : g[P]) {
      if (vis[i]) continue;
      vis[i] = 1;
      dis[i] = dis[P] + 1;
      Q.push(i);
    }
  }
  cout << *corners.begin() << "\n";
  cout << total - diameter << "\n";
}
