#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
const long long MOD = 119 << 23 | 1;
int inf = 1e9 + 7;
long long INF = 2e18 + 9;
long long power(long long x, long long y) {
  long long res = 1ll;
  x %= MOD;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % MOD;
    y = y >> 1ll;
    x = (x * x) % MOD;
  }
  return res;
}
long long inv(long long x) {
  long long r = 1ll, t = x, k = MOD - 2ll;
  while (k) {
    if (k & 1ll) r = (long long)r * t % MOD;
    t = (long long)t * t % MOD;
    k >>= 1;
  }
  return r;
}
bool isPrime(long long x) {
  if (x == 1) return false;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
const int nax = 1e5 + 13;
void prep() {}
void solve() {}
void read() {
  int n, m, u, v, k;
  cin >> n >> m;
  vector<int> V[n + 1], T[n + 1];
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    V[v].push_back(u);
    T[u].push_back(v);
  }
  cin >> k;
  vector<int> path(k);
  for (int i = 0; i < k; i++) cin >> path[i];
  vector<long long> ways(n + 1);
  vector<int> d(n + 1);
  bool odw[n + 1];
  for (int i = 0; i <= n; i++) {
    ways[i] = 1;
    d[i] = inf;
    odw[i] = 0;
  }
  d[path[k - 1]] = 0;
  queue<int> q;
  q.push(path[k - 1]);
  while (q.size()) {
    int akt = q.front();
    q.pop();
    if (odw[akt]) continue;
    odw[akt] = 1;
    for (auto el : V[akt]) {
      if (d[el] < d[akt] + 1) continue;
      if (d[el] == d[akt] + 1) {
        ways[el] += ways[akt];
        continue;
      }
      d[el] = d[akt] + 1;
      ways[el] = ways[akt];
      q.push(el);
    }
  }
  int mini = 0, maxi = 0;
  for (int i = 0; i < k - 1; i++) {
    for (auto w : T[path[i]]) {
      if (w == path[i + 1]) continue;
      if (d[w] == d[path[i]] - 1) {
        maxi++;
        break;
      }
    }
    if (d[path[i]] - 1 < d[path[i + 1]]) {
      mini++;
    }
  }
  cout << mini << ' ' << maxi << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie();
  cout.tie();
  srand(time(NULL));
  int T = 1;
  prep();
  for (int i = 1; i <= T; i++) {
    read();
    solve();
  }
  return 0;
}
