#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int INF = 1 << 30;
int MAXN = 1e7 + 2;
const double eps = 1e-13;
vector<int> adj[200009];
vector<int> radj[200009];
vector<int> adj2[200009];
int distb[200009];
int p[200009];
vector<pair<int, int> > el;
int main() {
  int n, e;
  scanf("%d%d", &n, &e);
  for (int i = 0; i < (e); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--;
    b--;
    adj[a].push_back(b);
    radj[b].push_back(a);
    el.push_back(make_pair(a, b));
  }
  int(pn);
  scanf("%d", &pn);
  for (int i = 0; i < (pn); ++i) {
    scanf("%d", &(p[i]));
    p[i]--;
  }
  memset((distb), -1, sizeof((distb)));
  queue<int> q;
  q.push(p[pn - 1]);
  distb[p[pn - 1]] = 0;
  while (((int)(q).size())) {
    int x = q.front();
    q.pop();
    for (int i : radj[x]) {
      if (distb[i] == -1) {
        distb[i] = distb[x] + 1;
        q.push(i);
      }
    }
  }
  for (auto i : el) {
    if (distb[i.first] == distb[i.second] + 1) {
      adj2[i.first].push_back(i.second);
    }
  }
  for (int i = 0; i < (n); ++i) {
    sort((adj2[i]).begin(), (adj2[i]).end());
  }
  int ans1 = 0, ans2 = 0;
  for (int i = 0; i < (pn - 1); ++i) {
    if (!binary_search((adj2[p[i]]).begin(), (adj2[p[i]]).end(), p[i + 1])) {
      ans1++;
      ans2++;
    } else if (((int)(adj2[p[i]]).size()) > 1) {
      ans2++;
    }
  }
  printf("%d %d", ans1, ans2);
}
