#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int inf = INT_MAX;
const long long inff = 1e18;
const long long mod = 271148239451;
vector<long long> G[maxn];
pair<long long, long long> dist[maxn];
long long p[maxn];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= m; i++) {
    long long x, y;
    cin >> x >> y;
    G[y].push_back(x);
  }
  long long k;
  cin >> k;
  for (long long i = 1; i <= k; i++) cin >> p[i];
  for (long long i = 1; i <= n; i++) {
    dist[i] = make_pair(inff, 0);
  }
  queue<long long> q;
  q.push(p[k]);
  dist[p[k]] = make_pair(0ll, 1ll);
  while (!q.empty()) {
    long long now = q.front();
    q.pop();
    for (long long i : G[now]) {
      if (dist[i].first == inff) {
        dist[i] = make_pair(dist[now].first + 1, 1);
        q.push(i);
      } else if (dist[i].first == dist[now].first + 1) {
        dist[i].second++;
      }
    }
  }
  long long minn = 0, maxx = 0;
  for (long long i = 1; i < k; i++)
    if (dist[p[i]].first != dist[p[i + 1]].first + 1)
      minn++, maxx++;
    else if (dist[p[i]].second > 1)
      maxx++;
  cout << minn << ' ' << maxx << '\n';
}
