#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
vector<vector<int>> g, g1;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  g.resize(n);
  g1.resize(n);
  for (int i = 0; i < m; i++) {
    int start, end;
    cin >> start >> end;
    start--, end--;
    g[end].push_back(start);
    g1[start].push_back(end);
  }
  int k;
  cin >> k;
  vector<int> path(k);
  for (int i = 0; i < k; i++) {
    cin >> path[i];
    path[i]--;
  }
  int t = *path.rbegin();
  queue<int> q;
  vector<int> l(n, -1);
  l[t] = 0;
  q.push(t);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (auto u : g[v])
      if (l[u] == -1) {
        q.push(u);
        l[u] = l[v] + 1;
      }
  }
  int minC = 0, maxC = 0;
  for (int i = 1; i < k; i++) {
    int v = path[i - 1];
    int u = path[i];
    if (l[u] >= l[v]) {
      minC++;
      maxC++;
    } else {
      for (auto e : g1[v]) {
        if (e != u && l[e] < l[v]) {
          maxC++;
          break;
        }
      }
    }
  }
  cout << minC << ' ' << maxC;
  return 0;
}
