#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int n, m;
int a[N], d[N];
int son[N];
int ans;
vector<vector<int> > G;
vector<pair<int, int> > E;
bool vis[N], check[N];
void mark(int u) {
  vis[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (!vis[v]) {
      mark(v);
      son[u] += son[v];
    }
  }
  if (check[u]) son[u]++;
}
void build(int u) {
  vis[u] = 1;
  for (int i = 0; i < G[u].size(); i++) {
    int v = G[u][i];
    if (!vis[v] && son[v]) {
      build(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]) {
      d[v] = d[u] + 1;
      dfs(v);
      ans++;
    }
  }
}
int main() {
  cin >> n >> m;
  G.assign(n + 2, vector<int>());
  for (int i = 1; i < n; 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]] = true;
  mark(a[1]);
  memset(vis, false, sizeof(vis));
  build(a[1]);
  memset(vis, false, sizeof(vis));
  G.assign(n + 2, vector<int>());
  for (int i = 0; i < E.size(); i++) {
    int u = E[i].first;
    int v = E[i].second;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  sort(a + 1, a + m + 1);
  int p = a[1];
  dfs(a[1]);
  for (int i = 1; i <= m; i++)
    if (d[a[i]] > d[p]) p = a[i];
  memset(vis, false, sizeof(vis));
  memset(d, 0, sizeof(d));
  dfs(p);
  int l = a[1], mx = 0;
  for (int i = 1; i <= m; i++)
    if (d[a[i]] > mx) {
      l = a[i];
      mx = d[a[i]];
    }
  cout << min(p, l) << endl;
  cout << ans - mx << endl;
}
