#include <bits/stdc++.h>
using namespace std;
const int Max = 200000;
struct Edge {
  int _from, _to, _next;
  Edge(int from = 0, int to = 0, int next = 0)
      : _from(from), _to(to), _next(next) {}
} edge[Max * 2];
bool vis[Max], vist[Max], visted[Max];
int head[Max], dis[Max], lenth, num = 0, edgenum = 0;
inline void Addedge(int from, int to) {
  edge[num] = Edge(from, to, head[from]);
  head[from] = num++;
}
void Dfs(int mark, int father) {
  for (int i = head[mark]; i != -1; i = edge[i]._next) {
    int now = edge[i]._to;
    if (now == father) continue;
    Dfs(now, mark);
    if (vist[now] == true || vis[now] == true) {
      vist[now] = true;
      vist[mark] = true;
      edgenum++;
    }
  }
}
void Bfs(int mark, int& u) {
  memset(visted, false, sizeof(visted));
  memset(dis, 0, sizeof(dis));
  lenth = 0;
  queue<int> qi;
  qi.push(mark);
  visted[mark] = true;
  dis[mark] = 0;
  u = mark;
  while (!qi.empty()) {
    int frt = qi.front();
    qi.pop();
    for (int i = head[frt]; i != -1; i = edge[i]._next) {
      int now = edge[i]._to;
      if (!vist[now] || visted[now]) continue;
      dis[now] = dis[frt] + 1;
      if (lenth < dis[now] && vis[now]) {
        lenth = dis[now];
        u = now;
      } else if (lenth == dis[now] && vis[now])
        u = min(u, now);
      visted[now] = true;
      qi.push(now);
    }
  }
}
int main() {
  memset(vis, false, sizeof(vis));
  memset(vist, false, sizeof(vist));
  memset(head, -1, sizeof(head));
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    Addedge(u, v);
    Addedge(v, u);
  }
  int mark;
  for (int i = 1; i <= m; ++i) {
    int a;
    scanf("%d", &a);
    vis[a] = true;
    if (i == 1) mark = a;
  }
  int u, v;
  Dfs(mark, -1);
  Bfs(mark, v);
  Bfs(v, u);
  printf("%d\n", min(u, v));
  printf("%d\n", edgenum * 2 - lenth);
  return 0;
}
