#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000")
#pragma warning(disable : 6031)
#pragma warning(disable : 4244)
#pragma warning(disable : 26451)
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long long mod = int(1e9) + 7;
const int INF = 1e9;
const long long LINF = 1e18;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << setprecision(18) << fixed;
  int n, m;
  cin >> n >> m;
  vector<vector<int>> g(n), rg(n);
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    g[u].push_back(v);
    rg[v].push_back(u);
  }
  int k;
  cin >> k;
  vector<int> p(k);
  for (auto& x : p) {
    cin >> x;
    x--;
  }
  set<int> cur;
  int s = p[0], t = p[k - 1];
  cur.insert(t);
  vector<int> cnt_g(n);
  vector<set<int>> par(n);
  vector<bool> visited(n, false);
  while (true) {
    for (auto u : cur) visited[u] = true;
    set<int> next;
    for (auto u : cur) {
      for (auto v : rg[u]) {
        if (visited[v]) continue;
        par[v].insert(u);
        next.insert(v);
      }
    }
    if ((int)(next).size() == 0) break;
    cur = next;
  }
  int rmin = 0, rmax = 0;
  for (int i = 0; i < k - 1; i++) {
    int v = p[i + 1];
    if (!par[p[i]].count(v)) {
      rmin++;
      rmax++;
    } else {
      if ((int)(par[p[i]]).size() > 1) rmax++;
    }
  }
  cout << rmin << " " << rmax;
  return 0;
}
