#include <bits/stdc++.h>
using namespace std;
template <typename T>
void out(T x) {
  cout << x << endl;
  exit(0);
}
const long long mod = 1e9 + 7;
const int maxn = 1e6 + 5;
int n, m;
vector<int> g[maxn];
bool ok[maxn];
int subtree[maxn];
void dfs(int at, int p) {
  subtree[at] = ok[at];
  for (int to : g[at]) {
    if (to == p) continue;
    dfs(to, at);
    subtree[at] += subtree[to];
  }
}
int dfs2(int at, int p) {
  int res = 1;
  for (int to : g[at]) {
    if (to == p) continue;
    if (subtree[to] == 0) continue;
    res += dfs2(to, at);
  }
  return res;
}
int dist[maxn];
void dfs3(int at, int p) {
  if (p == 0) {
    dist[at] = 0;
  }
  for (int to : g[at]) {
    if (to == p) continue;
    if (subtree[to] == 0) continue;
    dist[to] = dist[at] + 1;
    dfs3(to, at);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int a = -1;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    ok[x] = true;
    a = x;
  }
  dfs(a, 0);
  int edges = 2 * (dfs2(a, 0) - 1);
  dfs3(a, 0);
  for (int i = 1; i <= n; i++) {
    if (!ok[i]) continue;
    if (a == -1 || dist[i] > dist[a]) {
      a = i;
    }
  }
  int b = -1;
  dfs3(a, 0);
  for (int i = 1; i <= n; i++) {
    if (!ok[i]) continue;
    if (b == -1 || dist[i] > dist[b]) {
      b = i;
    }
  }
  int start = min(a, b);
  int len = edges - dist[b];
  cout << start << endl;
  cout << len << endl;
  return 0;
}
