#include <bits/stdc++.h>
using namespace std;
const int maxn = 123460;
int n, m;
int newTreeEdgeNum;
bool attack[maxn], keep[maxn];
struct Edge {
  int u, v;
};
vector<Edge> E;
vector<int> G[maxn];
void addedge(int u, int v) {
  E.push_back((Edge){u, v});
  E.push_back((Edge){v, u});
  int _size = E.size();
  G[u].push_back(_size - 2);
  G[v].push_back(_size - 1);
}
bool dfs(int now, int par) {
  int _size = G[now].size();
  bool flag = 0;
  for (int i = 0; i < _size; i++) {
    Edge& e = E[G[now][i]];
    int nxt = e.v;
    if (nxt == par) continue;
    if (dfs(nxt, now) && flag == 0) flag = 1;
  }
  keep[now] = (flag || attack[now]);
  if (keep[now] && par) newTreeEdgeNum++;
  return keep[now];
}
int dist[maxn];
void newTreeDFS(int now, int par) {
  if (!keep[now]) return;
  for (int i = 0; i < G[now].size(); i++) {
    Edge& e = E[G[now][i]];
    int nxt = e.v;
    if (nxt == par || !keep[nxt]) continue;
    dist[nxt] = dist[now] + 1;
    newTreeDFS(nxt, now);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, u, v; i <= n - 1; i++) {
    scanf("%d%d", &u, &v);
    addedge(u, v);
  }
  memset(attack, 0, sizeof(attack));
  int root = 0;
  for (int i = 1, tmp; i <= m; i++) {
    scanf("%d", &tmp);
    attack[tmp] = 1;
    if (root == 0) root = tmp;
  }
  memset(keep, 0, sizeof(keep));
  newTreeEdgeNum = 0;
  keep[root] = dfs(root, 0);
  dist[root] = 0;
  newTreeDFS(root, 0);
  int endpoint1;
  for (int i = 1, maxi = -1; i <= n; i++) {
    if (!keep[i]) continue;
    if (dist[i] > maxi) {
      maxi = dist[i];
      endpoint1 = i;
    }
  }
  dist[endpoint1] = 0;
  newTreeDFS(endpoint1, 0);
  int endpoint2;
  for (int i = 1, maxi = -1; i <= n; i++) {
    if (!keep[i]) continue;
    if (dist[i] > maxi) {
      maxi = dist[i];
      endpoint2 = i;
    }
  }
  printf("%d\n", min(endpoint1, endpoint2));
  printf("%d\n", 2 * newTreeEdgeNum - dist[endpoint2]);
}
