#include <bits/stdc++.h>
using namespace std;
queue<int> q;
int d[200100], a[200010];
vector<int> v[200100];
vector<int> v1[200100];
void getdis(int x) {
  memset(d, -1, sizeof(d));
  d[x] = 0;
  while (!q.empty()) q.pop();
  q.push(x);
  while (!q.empty()) {
    x = q.front();
    q.pop();
    int l = v[x].size();
    for (int i = 0; i < l; i++)
      if (d[v[x][i]] == -1) {
        d[v[x][i]] = d[x] + 1;
        q.push(v[x][i]);
      }
  }
}
int main() {
  int n, m, x, y;
  while (~scanf("%d%d", &n, &m)) {
    for (int i = 1; i <= n; i++) v[i].clear(), v1[i].clear();
    for (int i = 0; i < m; i++) {
      scanf("%d%d", &x, &y);
      v[y].push_back(x);
      v1[x].push_back(y);
    }
    int t;
    scanf("%d", &t);
    for (int i = 0; i < t; i++) scanf("%d", &a[i]);
    getdis(a[t - 1]);
    int l, r, sm, mi = 0, mx = 0;
    for (int i = 0; i < t - 1; i++) {
      if (d[a[i]] == d[a[i + 1]] + 1) {
        l = v1[a[i]].size(), r = d[a[i]] - 1;
        sm = 0;
        for (int x = 0; x < l; x++) {
          if (d[v1[a[i]][x]] == r) sm++;
        }
        if (sm > 1) mx++;
      } else {
        mx++;
        mi++;
      }
    }
    printf("%d %d\n", mi, mx);
  }
}
