#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9, N = 130000;
const long long INFL = 1e18;
int n, m, a[N], check[N], nChild[N];
vector<vector<int> > G;
vector<pair<int, int> > E;
bool vis[N];
int ans, d[N];
void prep(int u) {
  vis[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (vis[v]) continue;
    prep(v);
    nChild[u] += nChild[v];
  }
  nChild[u] += check[u];
}
void buildTree(int u) {
  vis[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (vis[v]) continue;
    if (nChild[v] != 0) buildTree(v), E.push_back(pair<int, int>(u, v));
  }
}
void dfs(int u) {
  vis[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (vis[v]) continue;
    d[v] = d[u] + 1;
    dfs(v);
    ans++;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  G.assign(n + 1, vector<int>());
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (int i = 1; i <= m; i++) cin >> a[i], check[a[i]] = 1;
  sort(a + 1, a + m + 1);
  prep(a[1]);
  memset(vis, 0, sizeof vis);
  buildTree(a[1]);
  G.assign(n + 1, vector<int>());
  for (int i = 0; i < E.size(); i++) {
    int u = E[i].first, v = E[i].second;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  memset(vis, 0, sizeof vis);
  int mx = 0, p = a[1];
  dfs(a[1]);
  for (int i = 1; i <= m; i++)
    if (mx < d[a[i]]) mx = d[a[i]], p = a[i];
  memset(d, 0, sizeof d);
  memset(vis, 0, sizeof vis);
  dfs(p);
  mx = 0;
  int q = a[1];
  for (int i = 1; i <= m; i++)
    if (mx < d[a[i]]) mx = d[a[i]], q = a[i];
  cout << min(p, q) << endl;
  cout << ans - mx << endl;
}
