#include <bits/stdc++.h>
using namespace std;
template <class T>
const T& max(const T& a, const T& b, const T& c) {
  return max(a, max(b, c));
}
template <class T>
const T& min(const T& a, const T& b, const T& c) {
  return min(a, min(b, c));
}
long long stoi(string& str) {
  istringstream second(str);
  long long i;
  second >> i;
  return i;
}
string itos(long long i) {
  stringstream second;
  second << i;
  return second.str();
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long poww(long long a, long long b) {
  if (b == 0) return 1;
  long long tmp = poww(a, b / 2);
  return (b & 1 ? a * tmp * tmp : tmp * tmp);
}
long long sumOfDigs(string s) {
  long long sum = 0;
  for (int i = 0; i < s.length(); i++) sum += s[i] - '0';
  return sum;
}
long long sumOfDigs(long long n) {
  return (n < 10 ? n : n % 10 + sumOfDigs(n / 10));
}
long long mod = poww(10, 6) + 3;
int months[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
using namespace std;
void t() { freopen("test.txt", "r", stdin); }
vector<vector<int> > v(123458);
int marked[123458], vis[123458], cnt[123458], dp[123458];
pair<int, int> p;
void dfs(int w, int dep) {
  if (vis[w]) return;
  vis[w] = 1;
  cnt[w] = marked[w];
  for (int i = 0; i < v[w].size(); i++) {
    int u = v[w][i];
    if (!vis[u]) {
      dfs(u, dep + 1);
      cnt[w] |= cnt[u];
      dp[w] += (cnt[u] ? 2 : 0) + dp[u];
    }
  }
  if (marked[w]) {
    if (dep > p.second) {
      p = make_pair(w, dep);
    } else if (dep == p.second)
      p.first = min(p.first, w);
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n - 1; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b), v[b].push_back(a);
  }
  int a = 0;
  for (int i = 1; i <= m; i++) {
    cin >> a;
    marked[a] = 1;
  }
  p = make_pair(INT_MAX, 0);
  dfs(a, 0);
  int pathLen = dp[a];
  int d = p.first;
  for (int i = 0; i < 123458; i++) vis[i] = false, cnt[i] = false;
  dfs(p.first, 0);
  cout << min(d, p.first) << endl;
  cout << pathLen - p.second << endl;
  return 0;
}
