#include <bits/stdc++.h>
using namespace std;
void fun() {
  int n, m;
  cin >> n >> m;
  vector<int> ma[n + 1];
  for (int i = 0; i < m; i++) {
    int s, d;
    cin >> s >> d;
    ma[d].push_back(s);
  }
  int k;
  cin >> k;
  int arr[k];
  for (int i = 0; i < k; i++) cin >> arr[i];
  vector<int> p[n + 1];
  queue<pair<int, int>> q;
  q.push(make_pair(arr[k - 1], 0));
  int vis[n + 1];
  memset(vis, -1, sizeof(vis));
  vis[arr[k - 1]] = 0;
  while (!q.empty()) {
    pair<int, int> cur = q.front();
    q.pop();
    for (int x : ma[cur.first]) {
      if (vis[x] == -1) {
        vis[x] = cur.second + 1;
        p[x].push_back(cur.first);
        q.push({x, cur.second + 1});
      } else if (vis[x] == cur.second + 1) {
        p[x].push_back(cur.first);
      }
    }
  }
  int a = 0, b = 0;
  for (int i = 0; i < k - 1; i++) {
    bool flag = false;
    for (int x : p[arr[i]]) {
      if (x == arr[i + 1]) {
        flag = true;
        break;
      }
    }
    if (!flag) {
      a++;
      b++;
    } else if (p[arr[i]].size() > 1) {
      b++;
    }
  }
  cout << a << " " << b << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  fun();
  return 0;
}
