#include <bits/stdc++.h>
using namespace std;
vector<long long int> adj[200500], adjacency[200500];
long long int n, m, k;
void solve() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    long long int x, y;
    cin >> x >> y;
    adj[y].push_back(x);
    adjacency[x].push_back(y);
  }
  cin >> k;
  vector<long long int> v(k + 1);
  vector<long long int> used(n + 1), d(n + 1), p(n + 1);
  for (int i = 0; i < k; i++) cin >> v[i];
  queue<long long int> q;
  q.push(v[k - 1]);
  used[v[k - 1]]++;
  p[v[k - 1]] = -1;
  while (!q.empty()) {
    long long int v = q.front();
    q.pop();
    for (auto u : adj[v]) {
      if (!used[u]) {
        used[u]++;
        q.push(u);
        d[u] = d[v] + 1;
        p[u] = v;
      }
    }
  }
  long long int l = 0, r = 0;
  for (int i = 0; i < k - 1; i++) {
    if (d[v[i + 1]] > d[v[i]] - 1)
      r++, l++;
    else {
      for (auto u : adjacency[v[i]]) {
        if (d[u] == d[v[i]] - 1 && u != v[i + 1]) {
          r++;
          break;
        }
      }
    }
  }
  cout << l << " " << r << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tst = 1;
  while (tst--) solve();
  return 0;
}
