#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200000];
bool attack[200000];
vector<int> toattack;
vector<int> adj2[200000];
int minid = 123456;
int mxh = -1;
int edges = 0;
void dfs2(int v, int p = -1, int h = 0) {
  if (h > mxh || (h == mxh && minid > v)) mxh = h, minid = v;
  for (int i = 0; i < adj2[v].size(); i++)
    if (adj2[v][i] != p) dfs2(adj2[v][i], v, h + 1);
}
bool dfs1(int v, int p = -1) {
  bool needed = attack[v];
  for (int i = 0; i < adj[v].size(); i++) {
    if (adj[v][i] != p)
      if (dfs1(adj[v][i], v)) {
        needed = true;
        adj2[v].push_back(adj[v][i]);
        adj2[adj[v][i]].push_back(v);
        edges++;
      }
  }
  return needed;
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  toattack.assign(m, 0);
  for (int i = 0; i < m; i++) {
    int x;
    scanf("%d", &x);
    attack[x] = 1;
    toattack[i] = x;
  }
  dfs1(toattack[0]);
  dfs2(toattack[0]);
  int md = minid;
  mxh = -1;
  dfs2(md);
  printf("%d\n%d\n", min(md, minid), 2 * edges - mxh);
}
