#include <bits/stdc++.h>
using namespace std;
const int MAXN = 123456 + 10;
vector<int> adj[MAXN];
queue<int> q;
int n, m;
bool mark[MAXN], del[MAXN], r[MAXN];
int high[MAXN], dels;
void dfs(int v) {
  mark[v] = 1;
  bool ok = 0;
  for (auto u : adj[v]) {
    if (!mark[u]) {
      dfs(u);
      if (!del[u]) {
        ok = 1;
      }
    }
  }
  if (!ok && !r[v]) del[v] = 1, dels++;
  return;
}
void bfs(int root) {
  for (int i = 0; i < MAXN; i++) mark[i] = 0, high[i] = 0;
  q.push(root), mark[root] = 1;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int i = 0; i < (int)adj[v].size(); i++) {
      int u = adj[v][i];
      if (!mark[u] && !del[u]) {
        high[u] = high[v] + 1;
        mark[u] = 1;
        q.push(u);
      }
    }
  }
  return;
}
pair<int, int> find_d(int u) {
  bfs(u);
  int hmax = -1, start = -1;
  for (int i = 0; i < n; i++) {
    if (!del[i] && high[i] > hmax) hmax = high[i];
  }
  for (int i = 0; i < n; i++) {
    if (!del[i] && high[i] == hmax) {
      start = i;
      break;
    }
  }
  bfs(start);
  int d = 0;
  for (int i = 0; i < n; i++) {
    if (!del[i] && high[i] > d) d = high[i];
  }
  int end = -1;
  for (int i = 0; i < n; i++) {
    if (!del[i] && high[i] == d) {
      end = i;
      break;
    }
  }
  return {min(start, end), d};
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v), adj[v].push_back(u);
  }
  for (int i = 0; i < m; i++) {
    int u;
    cin >> u;
    u--;
    r[u] = 1;
  }
  for (int i = 0; i < MAXN; i++) {
    if (r[i]) {
      dfs(i);
      pair<int, int> ans = find_d(i);
      cout << ans.first + 1 << endl;
      cout << 2 * (n - dels) - 2 - ans.second << endl;
      break;
    }
  }
  return 0;
}
