#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long long INF = 1e18;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n / 2; i++) {
    for (long long j = 1; j <= m; j++) {
      cout << i << " " << j << '\n';
      cout << n - i + 1 << " " << m - j + 1 << '\n';
    }
  }
  if (n & 1) {
    n = (n + 1) / 2;
    long long i = 1, j = m, bit = 0;
    while (i <= j) {
      cout << n << " " << (bit == 0 ? i : j) << '\n';
      if (bit == 0)
        i++;
      else
        j--;
      bit ^= 1;
    }
  }
  return 0;
}
