#include <bits/stdc++.h>
using namespace std;
vector<int> adj[130000];
int vis[130000];
int sizee[130000], dis[130000];
void dfs(int p, int u) {
  sizee[u] = 0;
  if (vis[u]) sizee[u] = 1;
  for (int i = 0; i < adj[u].size(); i++) {
    int v = adj[u][i];
    if (v != p) {
      dis[v] = dis[u] + 1;
      dfs(u, v);
      sizee[u] += sizee[v];
    }
  }
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < m; i++) {
    int a;
    scanf("%d", &a);
    vis[a] = 1;
  }
  memset(dis, 0, sizeof(dis));
  dfs(-1, 1);
  int v = -1;
  for (int i = 1; i <= n; i++) {
    if (vis[i] && (v == -1 || dis[i] > dis[v])) v = i;
  }
  memset(dis, 0, sizeof(dis));
  dfs(-1, v);
  int sum = 0, sx = 0;
  for (int i = 1; i <= n; i++) {
    if (sizee[i] && m - sizee[i] > 0) sum += 2;
    if (vis[i]) sx = max(sx, dis[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (sx == dis[i] && vis[i] && i < v) v = i;
  }
  printf("%d\n%d\n", v, sum - sx);
  return 0;
}
