#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int n;
vector<int> dist;
vector<int> color;
vector<vector<int> > listt;
int len = 0;
void dfs1(int v) {
  color[v] = 1;
  for (int i = 0; i < listt[v].size(); i++) {
    int to = listt[v][i];
    if (color[to] == 0) {
      len++;
      dist[to] = len;
      dfs1(to);
    }
  }
  len--;
}
vector<bool> attack;
vector<int> weight;
void dfs(int v) {
  color[v] = 1;
  if (attack[v]) {
    weight[v]++;
  }
  for (int i = 0; i < listt[v].size(); i++) {
    int to = listt[v][i];
    if (color[to] == 0) {
      if (listt[to].size() == 1) {
        if (attack[to]) {
          weight[to] = 1;
        }
        color[to] = 1;
      } else {
        dfs(to);
      }
      weight[v] += weight[to];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  int m;
  cin >> m;
  dist.resize(n, INF);
  listt.resize(n);
  weight.resize(n, 0);
  color.resize(n, 0);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    listt[a].push_back(b);
    listt[b].push_back(a);
  }
  attack.resize(n, false);
  int start;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    if (i == 0) {
      start = a - 1;
    }
    attack[a - 1] = 1;
  }
  dist[start] = 0;
  dfs1(start);
  int maxx = 0;
  int far1;
  for (int i = 0; i < n; i++) {
    if (dist[i] > maxx && attack[i]) {
      maxx = dist[i];
      far1 = i;
    } else if (dist[i] == maxx && attack[i]) {
      far1 = min(far1, i);
    }
  }
  for (int i = 0; i < n; i++) {
    dist[i] = INF;
    color[i] = 0;
  }
  dist[far1] = 0;
  len = 0;
  dfs1(far1);
  ;
  int rad = 0;
  int far2;
  for (int i = 0; i < n; i++) {
    if (attack[i]) {
      if (dist[i] > rad) {
        rad = dist[i];
        far2 = i;
      } else if (dist[i] == rad) {
        far2 = min(far2, i);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    color[i] = 0;
  }
  dfs(start);
  int nodes = 0;
  for (int i = 0; i < n; i++) {
    if (weight[i] == 0) {
      nodes++;
    }
  }
  cout << min(far1, far2) + 1 << '\n';
  cout << 2 * (n - 1 - nodes) - rad;
  return 0;
}
