#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<vector<int>> g(n);
  vector<vector<int>> inv(n);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    inv[b].push_back(a);
  }
  int k;
  cin >> k;
  vector<int> p(k);
  for (int &i : p) {
    cin >> i;
    i--;
  }
  int s = p[0], t = p.back();
  vector<int> dist1(n, 1e9);
  queue<int> q;
  q.push(t);
  dist1[t] = 0;
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int e : inv[u]) {
      if (dist1[e] > dist1[u] + 1) {
        dist1[e] = dist1[u] + 1;
        q.push(e);
      }
    }
  }
  int sol = 0;
  int mi = 0;
  for (int i = 0; i < p.size() - 1; i++) {
    int dist = dist1[p[i]];
    int cnt = 0;
    for (int e : g[p[i]]) {
      if (dist1[e] == dist - 1) cnt++;
    }
    if (dist1[p[i + 1]] == dist - 1) {
      sol += cnt > 1;
    } else {
      mi++;
      sol++;
    }
  }
  cout << mi << " " << sol;
}
