#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n, m, a, b, dp[N], depth[N];
vector<int> adj[N];
bool city[N];
void dfs(int u, int p) {
  for (int i = 0; i < adj[u].size(); i++) {
    if (p != adj[u][i]) {
      dfs(adj[u][i], u);
      city[u] |= city[adj[u][i]];
    }
  }
}
int mxNode = -1;
int mxDist = -1;
int cnt = 0;
void dfs2(int u, int p, int sum) {
  cnt++;
  if (sum == mxDist) mxNode = min(mxNode, u);
  if (sum > mxDist) {
    mxNode = u;
    mxDist = sum;
  }
  for (int i = 0; i < adj[u].size(); i++) {
    if (p != adj[u][i] && city[adj[u][i]]) dfs2(adj[u][i], u, sum + 1);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n - 1; i++) {
    scanf("%d%d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &a);
    city[a] = 1;
  }
  dfs(a, -1);
  dfs2(a, -1, 0);
  int res = mxNode;
  cnt = -1;
  mxNode = mxDist = -1;
  dfs2(res, -1, 0);
  res = min(res, mxNode);
  printf("%d\n%d\n", res, 2 * cnt - mxDist);
  return 0;
}
