#include <bits/stdc++.h>
using namespace std;
const long long MAX = 5e2 + 5, N = 2e5 + 5;
const long long MOD = 1e9 + 7, mod = 1e9 + 7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
vector<long long> g[N], tg[N], d(N, MOD);
vector<bool> vis(N, false);
long long path[N];
void solve(long long tt) {
  long long n, m, i, j, k, x, y, z, ans = 0;
  cin >> n >> m;
  for (i = 0; i < m; i++) {
    cin >> x >> y;
    g[x].push_back(y);
    tg[y].push_back(x);
  }
  cin >> k;
  for (i = 0; i < k; i++) cin >> path[i + 1];
  queue<long long> q;
  d[path[k]] = 0;
  q.push(path[k]);
  vis[path[k]] = true;
  while (!q.empty()) {
    long long curr = q.front();
    q.pop();
    for (auto z : tg[curr]) {
      if (!vis[z]) {
        vis[z] = true;
        d[z] = d[curr] + 1;
        q.push(z);
      }
    }
  }
  long long mx = 0, mn = 0;
  for (long long i = 1; i < k; i++) {
    if (d[path[i]] < d[path[i + 1]] + 1) {
      ++mx;
      ++mn;
    } else {
      bool ok = false;
      long long cnt = 0;
      for (auto z : g[path[i]])
        if (d[z] + 1 == d[path[i]]) {
          if (z != path[i + 1])
            ++cnt;
          else
            ok = true;
        }
      if (ok) mx += (cnt > 0);
    }
  }
  cout << mn << " " << mx << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T = 1;
  while (T--) solve(T);
  return 0;
}
