#include <bits/stdc++.h>
using namespace std;
const int MAXN = 312345;
const int MAXINT = 2147483098;
const long long MAXLL = 9223372036854775258LL;
vector<int> g[MAXN];
vector<int> rev_g[MAXN];
int p[MAXN];
int dist[MAXN];
queue<int> q;
void add(int v, int d) {
  if (dist[v] != -1) return;
  dist[v] = d;
  q.push(v);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m, k;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    rev_g[b].push_back(a);
  }
  for (int i = 1; i <= n; ++i) dist[i] = -1;
  cin >> k;
  for (int i = 0; i < k; ++i) cin >> p[i];
  add(p[k - 1], 0);
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    for (int to : rev_g[v]) add(to, dist[v] + 1);
  }
  int mn = 0, mx = 0;
  for (int i = 0; i < k - 1; ++i) {
    int v = p[i], to = p[i + 1], minima = 1e9;
    for (int nxt : g[v])
      if (dist[nxt] != -1) minima = min(minima, dist[nxt]);
    int mn_flag = 1, mx_flag = 0;
    for (int nxt : g[v])
      if (dist[nxt] == minima) {
        if (nxt == to)
          mn_flag = 0;
        else
          mx_flag = 1;
      }
    mn += mn_flag;
    mx += mx_flag;
  }
  cout << mn << " " << mx << '\n';
  return 0;
}
