#include <bits/stdc++.h>
using namespace std;
const int N = 123456 + 10;
int n, m, u, v;
int x, ans1, ans2;
vector<int> V[N], G[N];
int maxDep, ans;
int vis[N], sz[N];
void dfs(int cur, int fa) {
  sz[cur] = vis[cur];
  for (auto u : V[cur]) {
    if (u == fa) continue;
    dfs(u, cur);
    sz[cur] += sz[u];
  }
  if (!fa) return;
  if (sz[cur] && m - sz[cur]) {
    G[cur].push_back(fa);
    G[fa].push_back(cur);
  }
}
void solve(int cur, int fa, int dep) {
  if ((dep > maxDep) || (dep == maxDep && cur < ans)) {
    maxDep = dep;
    ans = cur;
  }
  sz[cur] = 1;
  for (auto u : G[cur]) {
    if (u == fa) continue;
    solve(u, cur, dep + 1);
    sz[cur] += sz[u];
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d %d", &u, &v);
    V[u].push_back(v);
    V[v].push_back(u);
  }
  int root;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &x);
    root = x;
    vis[x] = 1;
  }
  dfs(1, 0);
  maxDep = 0, ans = 1e8;
  solve(root, 0, 0);
  ans1 = ans;
  maxDep = 0;
  solve(ans, 0, 0);
  ans2 = ans;
  cout << min(ans1, ans2) << endl;
  cout << (sz[ans1] - 1) * 2 - maxDep << endl;
  return 0;
}
