#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmin(T &x, const T &y) {
  if (x > y) x = y;
}
template <typename T>
void chmax(T &x, const T &y) {
  if (x < y) x = y;
}
int read() {
  char c;
  while ((c = getchar()) < '-')
    ;
  if (c == '-') {
    int x = (c = getchar()) - '0';
    while ((c = getchar()) >= '0') x = x * 10 + c - '0';
    return -x;
  }
  int x = c - '0';
  while ((c = getchar()) >= '0') x = x * 10 + c - '0';
  return x;
}
const int N = 2e5 + 5;
vector<int> lk[N], nlk[N];
int g[N], p[N];
int main() {
  int n = read(), m = read();
  for (int i = 1; i <= m; ++i) {
    int x = read(), y = read();
    lk[y].push_back(x);
    nlk[x].push_back(y);
  }
  int k = read();
  for (int i = 1; i <= k; ++i) p[i] = read();
  for (int i = 1; i <= n; ++i) g[i] = -1;
  deque<int> q;
  auto P = [&](int x, int d) {
    if (g[x] == -1) {
      q.push_back(x);
      g[x] = d;
    }
  };
  P(p[k], 0);
  while (!q.empty()) {
    int x = q.front();
    q.pop_front();
    for (auto y : lk[x]) P(y, g[x] + 1);
  }
  int ans = 0;
  for (int i = 1; i <= k - 1; ++i) ans += (g[p[i]] != g[p[i + 1]] + 1);
  printf("%d ", ans);
  for (int i = 1; i <= k - 1; ++i) {
    int x = p[i], y = p[i + 1];
    if (g[y] == g[x] - 1)
      for (auto z : nlk[x])
        if (g[z] == g[x] - 1 && z != y) {
          ++ans;
          break;
        }
  }
  printf("%d\n", ans);
}
