#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<long long> adj[n + 1], radj[n + 1];
  while (m--) {
    long long a, b;
    cin >> a >> b;
    adj[b].push_back(a);
    radj[a].push_back(b);
  }
  long long k;
  cin >> k;
  vector<long long> b(k);
  for (long long& x : b) cin >> x;
  queue<long long> q;
  q.push(b[k - 1]);
  vector<long long> vis(n + 1), dis(n + 1);
  vis[b[k - 1]] = 1;
  while (q.size() > 0) {
    long long p = q.front();
    q.pop();
    for (long long& x : adj[p]) {
      if (vis[x]) continue;
      dis[x] = dis[p] + 1;
      vis[x] = 1;
      q.push(x);
    }
  }
  long long mn = 0, mx = 0;
  for (long long i = 0; i < k - 1; i++) {
    long long mnn = 1e9;
    bool flg = 1;
    for (long long& x : radj[b[i]]) {
      if (dis[b[i + 1]] >= dis[x] && flg && x != b[i + 1]) {
        mx++;
        flg = 0;
      }
      mnn = min(dis[x], mnn);
    }
    if (mnn != dis[b[i + 1]]) mn++;
  }
  cout << mn << " " << mx;
  return 0;
}
