#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200001;
int mx, r;
vector<int> tree[MAXN];
int attack[MAXN] = {
    0,
};
int dep[MAXN] = {
    0,
};
int vis[MAXN] = {
    0,
};
int node;
int sz[MAXN] = {
    0,
};
int getPath(int here, int dad) {
  sz[here] = 1;
  int chk = 0;
  if (attack[here]) chk = 1;
  for (auto there : tree[here]) {
    if (there == dad) continue;
    if (getPath(there, here)) {
      chk = 1;
      sz[here] += sz[there];
    }
  }
  return chk;
}
void dfs(int here, int dad, int d) {
  dep[here] = d;
  if (mx < dep[here] && attack[here]) {
    node = here;
    mx = dep[here];
  }
  for (auto there : tree[here]) {
    if (there == dad) continue;
    dfs(there, here, d + 1);
  }
}
vector<int> cand;
int R;
void go(int here, int dad, int d) {
  dep[here] = d;
  if (dep[here] == R && attack[here]) cand.push_back(here);
  for (auto there : tree[here]) {
    if (there == dad) continue;
    go(there, here, d + 1);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    tree[u].push_back(v);
    tree[v].push_back(u);
  }
  for (int i = 0; i < m; i++) {
    int atk;
    cin >> atk;
    attack[atk] = 1;
  }
  mx = -1;
  dfs(1, -1, 0);
  int x = node;
  mx = -1;
  dfs(x, -1, 0);
  R = mx;
  int y = node;
  getPath(y, -1);
  int edgeN = 2 * (sz[y] - 1);
  go(x, -1, 0);
  go(y, -1, 0);
  sort(cand.begin(), cand.end());
  cout << cand[0] << "\n";
  cout << edgeN - R;
  return 0;
}
