#include <bits/stdc++.h>
using namespace std;
struct node {
  vector<int> to, from;
  int best = -1;
};
vector<node> g;
int main() {
  int n, m;
  cin >> n >> m;
  g.resize(n + 1);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    g[a].to.push_back(b);
    g[b].from.push_back(a);
  }
  int k;
  cin >> k;
  vector<int> p(k);
  for (int i = 0; i < k; i++) {
    cin >> p[i];
  }
  vector<int> next = {p[k - 1]};
  g[p[k - 1]].best = 0;
  int i = 0;
  while (i < next.size()) {
    int curr = next[i++];
    for (int ne : g[curr].from)
      if (g[ne].best == -1) {
        g[ne].best = g[curr].best + 1;
        next.push_back(ne);
      }
  }
  int count1 = k - 1, count2 = 0;
  for (int i = 1; i < k; i++) {
    if (g[p[i]].best + 1 == g[p[i - 1]].best) count1--;
    for (int ne : g[p[i - 1]].to) {
      if (ne != p[i] && g[ne].best <= g[p[i]].best) {
        count2++;
        break;
      }
    }
  }
  cout << count1 << " " << count2 << "\n";
}
