#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U>
using Pa = pair<T, U>;
template <class T>
using vec = vector<T>;
template <class T>
using vvec = vector<vec<T>>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N, M;
  cin >> N >> M;
  vvec<int> g(N), rg(N);
  ;
  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    rg[a].push_back(b);
    g[b].push_back(a);
  }
  int K;
  cin >> K;
  vec<int> P(K);
  for (int i = 0; i < K; i++) {
    cin >> P[i];
    P[i]--;
  }
  vec<int> dist(N, -1);
  queue<int> Q;
  Q.push(P[K - 1]);
  dist[P[K - 1]] = 0;
  while (!Q.empty()) {
    int cur = Q.front();
    Q.pop();
    for (auto& to : g[cur])
      if (dist[to] == -1) {
        dist[to] = dist[cur] + 1;
        Q.push(to);
      }
  }
  int mi = 0, ma = 0;
  for (int i = 0; i < K - 1; i++) {
    if (dist[P[i]] - 1 != dist[P[i + 1]]) {
      mi++;
      ma++;
    } else {
      int c = 0;
      for (auto& to : rg[P[i]]) c += (dist[P[i]] - 1 == dist[to]);
      ma += (c != 1);
    }
  }
  cout << mi << " " << ma << "\n";
}
