#include <bits/stdc++.h>
using namespace std;
const int N = 123457;
vector<int> G[N];
int n, m, dep[N], hum[N], sbh[N], ed = 0, dis[N];
vector<int> sb;
int dfs(int v, int p, int d) {
  int res = 0;
  for (int to : G[v])
    if (to != p) {
      int a = dfs(to, v, d + 1);
      res += a;
      if (a) ed++;
    }
  res += hum[v];
  dis[v] = d;
  return res;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < (int)n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  vector<int> atk(m);
  for (int i = 0; i < (int)m; ++i) {
    int c;
    cin >> c;
    atk[i] = c;
    hum[c] = 1;
  }
  if (m == 1) {
    cout << atk[0] << '\n' << 0;
    return 0;
  }
  sort((atk).begin(), (atk).end());
  dfs(atk[0], 0, 0);
  int u = -1, v = -1, d = 0, len = ed * 2;
  for (int a : atk) {
    if (dis[a] > d) {
      u = a;
      d = dis[a];
    }
  }
  dfs(u, 0, 0);
  d = 0;
  for (int a : atk) {
    if (dis[a] > d) {
      v = a;
      d = dis[a];
    }
  }
  cout << min(u, v) << '\n';
  cout << len - dis[v] << '\n';
}
