#include <bits/stdc++.h>
using namespace std;
queue<pair<long long, long long>> q;
vector<long long> edge[123490], p, k;
long long a[123490], dis[123490], vis[123490], c[123490], sum = 0;
void dfs(long long u, long long d) {
  vis[u] = 1;
  dis[u] = d;
  for (auto v : edge[u]) {
    if (vis[v]) continue;
    vis[v] = 1;
    dfs(v, d + 1);
  }
}
void dfs1(long long u, long long y) {
  vis[u] = 1;
  if (u == y) {
    for (auto i : p) {
      q.push({i, 0});
      k.push_back(i);
    }
    return;
  }
  for (auto v : edge[u]) {
    if (vis[v]) continue;
    vis[v] = 1;
    p.push_back(v);
    dfs1(v, y);
    p.pop_back();
    vis[v] = 0;
  }
}
int dfs1(int u) {
  vis[u] = 1;
  int x = c[u];
  for (auto v : edge[u]) {
    if (vis[v]) continue;
    vis[v] = 1;
    x |= dfs1(v);
  }
  sum += x;
  return x;
}
int main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i < n; i++) {
    long long u, v;
    scanf("%lld%lld", &u, &v);
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  for (long long i = 1; i <= m; i++) {
    scanf("%lld", &a[i]);
    c[a[i]] = 1;
  }
  dfs1(a[1]);
  sort(a + 1, a + 1 + m);
  memset(vis, 0, sizeof(vis));
  dfs(a[1], 0);
  long long x = 1;
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= m; i++) {
    if (dis[a[i]] > dis[a[x]]) x = i;
  }
  memset(dis, 0, sizeof(dis));
  dfs(a[x], 0);
  long long y = x;
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= m; i++) {
    if (dis[a[i]] > dis[a[y]]) y = i;
  }
  cout << min(a[y], a[x]) << endl;
  cout << sum * 2 - 2 - dis[a[y]] << endl;
}
