#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int n, m, init, target, k;
vector<vector<int> > g, gg;
vector<int> path, vis, dis, parent;
void bfs(int s) {
  vis[s] = 1;
  queue<pair<int, int> > q;
  q.push({s, 0});
  while (q.size()) {
    int u = q.front().first;
    int d = q.front().second;
    q.pop();
    dis[u] = d;
    for (int v : g[u]) {
      if (!vis[v]) {
        vis[v] = 1;
        q.push({v, d + 1});
      }
    }
  }
}
void solve() {
  int max_rec = 0;
  int min_rec = 0;
  int v = init;
  int pos = 0;
  int c = 0;
  while (v != target) {
    pos++;
    int u = path[pos];
    if (dis[u] + 1 != dis[v]) {
      max_rec++;
      min_rec++;
      v = u;
      continue;
    }
    int paths = 0;
    for (int w : gg[v]) {
      if (dis[v] == dis[w] + 1) paths++;
    }
    if (paths != 1) {
      max_rec++;
    }
    v = path[pos];
  }
  cout << min_rec << " " << max_rec << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int u, v;
  cin >> n >> m;
  g.assign(n + 1, vector<int>());
  gg.assign(n + 1, vector<int>());
  for (int i = 0; i < m; ++i) {
    cin >> u >> v;
    g[v].push_back(u);
    gg[u].push_back(v);
  }
  cin >> k;
  path.resize(k);
  for (int j = 0; j < k; ++j) {
    cin >> path[j];
  }
  init = path[0];
  target = path[k - 1];
  dis.assign(n + 1, 0);
  vis.assign(n + 1, 0);
  bfs(target);
  for (int l = 1; l <= n; ++l) {
  }
  solve();
}
