#include <bits/stdc++.h>
using namespace std;
long long int n, m, ar[1000005], sum, t, mark[1000005], ans[1000005], sum2;
queue<pair<int, int> > pq;
vector<int> v[1000005], v2[1000005];
void f(int tuttt) {
  pq.push({tuttt, 0});
  while (pq.size()) {
    pair<long long int, long long int> x = pq.front();
    pq.pop();
    long long int a = x.first;
    long long int b = x.second;
    if (mark[a]) continue;
    mark[a] = 1;
    ans[a] = b;
    for (int i = 0; i < v2[a].size(); i++) {
      long long int y = v2[a][i];
      if (!mark[y]) pq.push({y, b + 1});
    }
  }
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> t >> m;
  for (long long int i = 1; i <= m; i++) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v2[b].push_back(a);
  }
  cin >> n;
  for (long long int i = 1; i <= n; i++) cin >> ar[i];
  f(ar[n]);
  for (long long int i = 1; i <= n - 1; i++) {
    long long int x = ar[i];
    long long int y = ar[i + 1];
    if (ans[y] + 1 != ans[x]) sum++;
    int flag = 0;
    for (int j = 0; j < v[x].size(); j++) {
      if (v[x][j] == y) continue;
      if (ans[v[x][j]] <= ans[y]) flag = 1;
    }
    sum2 += flag;
  }
  cout << sum << " " << sum2;
}
