#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, m, x, y, i, k, p[N], d[N];
vector<int> e[N], re[N];
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; ++i)
    scanf("%d%d", &x, &y), e[x].push_back(y), re[y].push_back(x);
  scanf("%d", &k);
  for (i = 1; i <= k; ++i) scanf("%d", p + i);
  queue<int> q;
  q.push(p[k]);
  d[p[k]] = 1;
  for (; !q.empty();) {
    x = q.front();
    q.pop();
    for (int y : re[x])
      if (!d[y]) d[y] = d[x] + 1, q.push(y);
  }
  int ans1 = 0, ans2 = 0;
  for (i = 1; i < k; ++i) {
    ans1 += d[p[i]] < d[p[i + 1]] + 1;
    bool fl = 0;
    for (int y : e[p[i]])
      if (y != p[i + 1] && d[p[i]] == d[y] + 1) fl = 1;
    ans2 += fl;
  }
  printf("%d %d\n", ans1, ans2);
}
