#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 3;
int INF = 2e16 + 88;
const long double EPS = 1e-8;
const int MOD = 1e9 + 7;
const long double Pi = acos(-1);
vector<int> adj[MAX];
int should[MAX];
pair<int, int> dfs(int v, int p) {
  pair<int, int> ret;
  ret.first = should[v];
  ret.second = 1;
  if (p == 0) ret.second = 0;
  for (int i = 0; i < adj[v].size(); ++i) {
    int nxt = adj[v][i];
    if (nxt == p) continue;
    pair<int, int> cur = dfs(nxt, v);
    if (cur.first) ret.first = 1, ret.second += cur.second;
  }
  return ret;
}
int mx, mxi;
void dfs(int v, int p, int len) {
  if (should[v] && (len > mx || len == mx && v < mxi)) mx = len, mxi = v;
  for (auto it : adj[v]) {
    if (it == p) continue;
    dfs(it, v, len + 1);
  }
}
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d", &x);
    scanf("%d", &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  int st;
  for (int i = 0; i < m; ++i) {
    int x;
    scanf("%d", &x);
    st = x;
    should[x] = 1;
  }
  pair<int, int> len = dfs(st, 0);
  mxi = n + 5;
  dfs(st, 0, 0);
  int res = mxi;
  dfs(mxi, 0, 0);
  res = min(res, mxi);
  cout << res << endl;
  cout << len.second * 2 - mx;
  return 0;
}
