#include <bits/stdc++.h>
using namespace std;
const int maxn = 155555;
vector<int> E[maxn];
int fa[maxn];
bool Ned[maxn];
int m, n, rt;
bool dfs(int u) {
  for (int i = 0; i < E[u].size(); i++) {
    int v = E[u][i];
    if (v != fa[u]) {
      fa[v] = u;
      Ned[u] |= dfs(v);
    }
  }
  return Ned[u];
}
int dis[maxn];
bool vis[maxn];
void dfs2(int u) {
  vis[u] = 1;
  for (int i = 0; i < E[u].size(); i++) {
    int v = E[u][i];
    if (!vis[v] && Ned[v]) {
      dis[v] = dis[u] + 1;
      dfs2(v);
    }
  }
}
int main() {
  ios::sync_with_stdio(1);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    E[u].push_back(v);
    E[v].push_back(u);
  }
  for (int i = 1; i <= m; i++) {
    int t;
    cin >> t;
    rt = t;
    Ned[t] = 1;
  }
  dfs(rt);
  int ans = -1;
  for (int i = 1; i <= n; i++)
    if (Ned[i]) ans++;
  ans *= 2;
  memset(vis, 0, sizeof(vis));
  dfs2(rt);
  for (int i = 1; i <= n; i++) {
    if (vis[i] && dis[i] > dis[rt]) rt = i;
  }
  dis[rt] = 0;
  memset(vis, 0, sizeof(vis));
  dfs2(rt);
  int rtt = rt;
  for (int i = 1; i <= n; i++) {
    if (vis[i] && dis[i] > dis[rtt]) rtt = i;
  }
  ans -= dis[rtt];
  cout << min(rt, rtt) << endl << ans << endl;
  return 0;
}
