#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<long long> adj[n + 1];
  vector<long long> radj[n + 1];
  for (long long i = 0; i < m; i++) {
    long long u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    radj[v].push_back(u);
  }
  long long k;
  cin >> k;
  vector<long long> a(k);
  for (long long i = 0; i < k; i++) {
    cin >> a[i];
  }
  vector<long long> dist(n + 1, -1);
  queue<long long> q;
  q.push(a[k - 1]);
  dist[a[k - 1]] = 0;
  while (!q.empty()) {
    long long v = q.front();
    q.pop();
    for (auto it : radj[v]) {
      if (dist[it] == -1) {
        dist[it] = dist[v] + 1;
        q.push(it);
      } else {
        dist[it] = min(dist[it], dist[v] + 1);
      }
    }
  }
  long long mn = 0, mx = 0;
  debug() << " ["
          << "dist"
             ": "
          << (dist) << "] ";
  for (long long i = 0; i < k - 1; i++) {
    debug() << " ["
            << "i"
               ": "
            << (i)
            << "] "
               " ["
            << "a[i]"
               ": "
            << (a[i])
            << "] "
               " ["
            << "dist[a[i]]"
               ": "
            << (dist[a[i]]) << "] ";
    if (dist[a[i + 1]] >= dist[a[i]]) {
      mn++, mx++;
      continue;
    }
    long long cnt = 0;
    for (auto it : adj[a[i]]) {
      if (dist[it] == dist[a[i]] - 1) {
        cnt++;
      }
    }
    if (cnt >= 2) {
      mx++;
    }
  }
  cout << mn << " " << mx << '\n';
}
