#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
int n, m, k;
int a[maxn], d[maxn], p[maxn];
vector<int> graph[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    graph[v].push_back(u);
  }
  cin >> k;
  for (int i = 0; i < k; i++) {
    cin >> a[i];
    a[i]--;
  }
  queue<int> q;
  q.push(a[k - 1]);
  memset(d, 0x3f3f3f3f, sizeof(d));
  d[a[k - 1]] = 0;
  while (!q.empty()) {
    int c = q.front();
    q.pop();
    for (int i : graph[c]) {
      if (d[i] > d[c] + 1) {
        d[i] = d[c] + 1;
        q.push(i);
      }
      if (d[i] == d[c] + 1) {
        p[i]++;
      }
    }
  }
  int ret1 = 0, ret2 = 0;
  for (int i = 0; i < k - 1; i++) {
    ret1 += (d[a[i]] != d[a[i + 1]] + 1);
    ret2 += (p[a[i]] >= 2 && d[a[i]] == d[a[i + 1]] + 1);
  }
  cout << ret1 << " " << ret1 + ret2 << '\n';
  return 0;
}
