#include <bits/stdc++.h>
using namespace std;
long long int dis[200005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, k;
  cin >> n >> m;
  vector<vector<long long int>> v(n + 1), g(n + 1);
  for (long long int i = 0; i < m; i++) {
    long long int a, b;
    cin >> a >> b;
    v[b].push_back(a);
    g[a].push_back(b);
  }
  cin >> k;
  long long int arr[k], lo = 0, hi = 0;
  for (long long int i = 0; i < k; i++) cin >> arr[k - i - 1];
  queue<long long int> q;
  q.push(arr[0]);
  dis[arr[0]] = 1;
  while (!q.empty()) {
    long long int i = q.front();
    q.pop();
    for (long long int j = 0; j < v[i].size(); j++)
      if (!dis[v[i][j]]) {
        q.push(v[i][j]);
        dis[v[i][j]] = dis[i] + 1;
      }
  }
  for (long long int i = 1; i < k; i++) {
    if (dis[arr[i]] != dis[arr[i - 1]] + 1) lo++;
    long long int u = arr[i], f = 0;
    for (long long int j = 0; j < g[u].size(); j++)
      if (g[u][j] != arr[i - 1] && dis[g[u][j]] + 1 == dis[u]) f = 1;
    if (f) hi++;
  }
  cout << lo << " " << hi;
}
