#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> adj;
vector<vector<int>> adjrev;
vector<int> p;
int n, m, k;
vector<int> sptt;
void dfs(int x) {
  queue<int> q;
  q.push(x);
  sptt[x] = 0;
  vector<bool> v(n + 1, 0);
  v[x] = 1;
  while (!q.empty()) {
    int temp = q.front();
    q.pop();
    for (auto y : adjrev[temp])
      if (!v[y]) {
        q.push(y);
        sptt[y] = sptt[temp] + 1;
        v[y] = 1;
      }
  }
}
int main() {
  cin >> n >> m;
  sptt.resize(n + 1);
  adj.resize(n + 1);
  adjrev.resize(n + 1);
  for (int i = (1); i <= (m); ++i) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adjrev[v].push_back(u);
  }
  cin >> k;
  p.resize(k + 1);
  for (int i = (1); i <= (k); ++i) cin >> p[i];
  int s = p[1], t = p[k];
  dfs(t);
  vector<bool> v(n + 1, 0);
  v[s] = 1;
  int max = 0, min = 0;
  for (int i = (1); i <= (k - 1); ++i) {
    if (sptt[p[i + 1]] + 1 == sptt[p[i]]) {
      int cnt = 0;
      for (auto y : adj[p[i]])
        if (sptt[y] + 1 == sptt[p[i]]) cnt++;
      if (cnt > 1) max++;
    } else
      max++, min++;
  }
  cout << min << " " << max;
}
