#include <bits/stdc++.h>
using namespace std;
vector<int> p[200005];
vector<int> pf[200005];
int a[200005];
int dist[200005];
int visit[200005];
int k;
void bfs() {
  queue<int> p1;
  p1.push(a[k]);
  visit[a[k]] = 1;
  while (!p1.empty()) {
    int head = p1.front();
    p1.pop();
    for (int j = 0; j < pf[head].size(); j++) {
      int x = pf[head][j];
      if (!visit[x]) {
        dist[x] = dist[head] + 1;
        visit[x] = 1;
        p1.push(x);
      }
    }
  }
}
int main() {
  int n, m;
  int u, v;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    scanf("%d%d", &u, &v);
    p[u].push_back(v);
    pf[v].push_back(u);
  }
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &a[i]);
  }
  bfs();
  int ans1 = 0, ans2 = 0;
  for (int i = 1; i < k; i++) {
    int head = a[i];
    int f1 = 0, f2 = 0;
    for (int j = 0; j < p[head].size(); j++) {
      int point = p[head][j];
      if (dist[head] == dist[point] + 1 && a[i + 1] != point) f1 = 1;
      if (dist[head] != dist[point] + 1 && a[i + 1] == point) f2 = 1;
    }
    if (f2) ans1++;
    if (f1 == 1 && f2 == 0) ans2++;
  }
  printf("%d %d\n", ans1, ans1 + ans2);
}
